@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/index.cjs CHANGED
@@ -5918,21 +5918,21 @@ function arrayBufferFromDataURI(dataURI) {
5918
5918
  */
5919
5919
 
5920
5920
 
5921
- let initializingModule = false;
5921
+ let modulePromise;
5922
5922
 
5923
5923
  g(configure);
5924
5924
  configureWorker({
5925
5925
  initModule: config => {
5926
- if (!initializedModule && !initializingModule) {
5926
+ if (!modulePromise) {
5927
5927
  let { wasmURI } = config;
5928
5928
  // deno-lint-ignore valid-typeof
5929
5929
  if (typeof wasmURI == FUNCTION_TYPE) {
5930
5930
  wasmURI = wasmURI();
5931
5931
  }
5932
- initializingModule = false;
5933
- return initModule(wasmURI, config);
5932
+ modulePromise = initModule(wasmURI, config);
5933
+
5934
5934
  }
5935
- initializingModule = true;
5935
+ return modulePromise;
5936
5936
  }
5937
5937
  });
5938
5938
  configure({
@@ -5941,6 +5941,7 @@ configure({
5941
5941
  });
5942
5942
 
5943
5943
  function terminateWorkersAndModule() {
5944
+ modulePromise = null;
5944
5945
  terminateWorkers();
5945
5946
  resetWasmModule();
5946
5947
  }