Skip to content

Commit

Permalink
fix: invalidate the WASM module promise on wasm url change only
Browse files Browse the repository at this point in the history
  • Loading branch information
theashraf committed Nov 26, 2024
1 parent 4ed7978 commit 3a41e96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/web/src/core/wasm-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let wasmURL = DEFAULT_WASM_URL;
* @param url - The new URL for the WASM file.
*/
export function setWasmUrl(url: string): void {
if (url === wasmURL) return;
wasmURL = url;
modulePromise = null;
}
Expand Down

0 comments on commit 3a41e96

Please sign in to comment.