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 +1 -1
- package/src/storage/indexeddb.js +4 -1
package/package.json
CHANGED
package/src/storage/indexeddb.js
CHANGED
|
@@ -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.
|
|
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
|
|