Skip to content

Commit

Permalink
Use URL api
Browse files Browse the repository at this point in the history
  • Loading branch information
faridyagubbayli authored Dec 6, 2024
1 parent 83ce7a1 commit 4af9f6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export async function fetchArrayBuffer({
onHeader,
loadFullVolume = false,
}) {
const isCompressed = url.includes('.gz');
const _url = new URL(url);
const isCompressed = _url.pathname.endsWith('.gz');
let receivedData = new Uint8Array(0);
let niftiHeader = null;
const sliceInfo = null;
Expand Down

0 comments on commit 4af9f6e

Please sign in to comment.