@zip.js/zip.js 2.8.3 → 2.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zip-js/zip-js",
3
- "version": "2.8.3",
3
+ "version": "2.8.4",
4
4
  "exports": {
5
5
  ".": "./index.js"
6
6
  },
package/dist/zip-fs.js CHANGED
@@ -5924,21 +5924,21 @@
5924
5924
  */
5925
5925
 
5926
5926
 
5927
- let initializingModule = false;
5927
+ let modulePromise;
5928
5928
 
5929
5929
  g(configure);
5930
5930
  configureWorker({
5931
5931
  initModule: config => {
5932
- if (!initializedModule && !initializingModule) {
5932
+ if (!modulePromise) {
5933
5933
  let { wasmURI } = config;
5934
5934
  // deno-lint-ignore valid-typeof
5935
5935
  if (typeof wasmURI == FUNCTION_TYPE) {
5936
5936
  wasmURI = wasmURI();
5937
5937
  }
5938
- initializingModule = false;
5939
- return initModule(wasmURI, config);
5938
+ modulePromise = initModule(wasmURI, config);
5939
+
5940
5940
  }
5941
- initializingModule = true;
5941
+ return modulePromise;
5942
5942
  }
5943
5943
  });
5944
5944
  configure({
@@ -5947,6 +5947,7 @@
5947
5947
  });
5948
5948
 
5949
5949
  function terminateWorkersAndModule() {
5950
+ modulePromise = null;
5950
5951
  terminateWorkers();
5951
5952
  resetWasmModule();
5952
5953
  }