origin-snapshot 0.1.0 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "origin-snapshot",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Export and restore a browser origin's localStorage, sessionStorage, IndexedDB, and OPFS as a single gzip-compressed snapshot file.",
5
5
  "keywords": [
6
6
  "localstorage",
@@ -172,7 +172,10 @@ function openAndUpgrade(name, version, stores) {
172
172
  }
173
173
  };
174
174
  open.onsuccess = () => resolve(open.result);
175
- open.onerror = () => reject(open.er open.onblocked = () => reject(blockedError(name));
175
+ open.onerror = () => reject(open.error);
176
+ // A blocked upgrade never fires success/error on its own — fail fast with an
177
+ // actionable error instead of leaving the restore hung forever.
178
+ open.onblocked = () => reject(blockedError(name));
176
179
  });
177
180
  }
178
181