Skip to content

Commit

Permalink
Minor bugfix for the example code for fetching ranges.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Dec 4, 2024
1 parent 0954deb commit 97370ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const fetch_range = async (path, start, end) => {
if (!res.ok) {
throw new Error("oops, failed to retrieve range from '" + path + "' (" + String(res.status) + ")");
}
let output = await res.bytes();
let output = new Uint8Array(await res.arrayBuffer());
return output.slice(0, end - start); // trim off any excess junk
};
```
Expand Down

0 comments on commit 97370ca

Please sign in to comment.