Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Feb 1, 2024
1 parent 207412e commit 241b78b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webviews/extension-side/plotView/plotViewHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function getPngDimensions(buffer: Uint8Array): { width: number; height: n
}
// The dimensions of a PNG are the first 8 bytes (width then height) of the IHDR chunk. The
// IHDR chunk starts at offset 8.
const view = new DataView(buffer.buffer);
const view = new DataView(new Uint8Array(buffer).buffer);
return {
width: view.getUint32(16, false),
height: view.getUint32(20, false)
Expand Down

0 comments on commit 241b78b

Please sign in to comment.