Skip to content

Commit f99eb20

Browse files
Fix the array buffer casting
1 parent 7be335e commit f99eb20

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kernel/src/services/FirmwareService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ export class FirmwareService {
4242
const { entries } = await unzip(allChunks);
4343

4444
const unzippedData: { [filename: string]: Uint8Array } = {};
45-
for (const entry of Object.values(entries) as { name: string; arrayBuffer: () => Promise<Uint8Array> }[]) {
46-
unzippedData[entry.name] = new Uint8Array(await entry.arrayBuffer());
45+
for (const entry of Object.values(entries) as { name: string; arrayBuffer: () => Promise<ArrayBuffer> }[]) {
46+
const arrayBuffer = await entry.arrayBuffer();
47+
unzippedData[entry.name] = new Uint8Array(arrayBuffer);
4748
}
4849
return unzippedData;
4950
}

0 commit comments

Comments
 (0)