Skip to content

Commit 29d6ac3

Browse files
committed
fix error that byte could be undefined
1 parent 4b95f5e commit 29d6ac3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/fs/guest-js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ function fromBytes(buffer: FixedSizeArray<number, 8>): number {
280280
let x = 0
281281
for (let i = 0; i < size; i++) {
282282
// eslint-disable-next-line security/detect-object-injection
283-
const byte = bytes[i]
283+
const byte = bytes[i] ?? 0
284284
x *= 0x100
285285
x += byte
286286
}

0 commit comments

Comments
 (0)