Comparing version 2.1.2 to 2.1.3
@@ -292,7 +292,9 @@ 'use strict'; | ||
request.onupgradeneeded = function(event) { | ||
if (upgradeCallback) { | ||
upgradeCallback(new UpgradeDB(request.result, event.oldVersion, request.transaction)); | ||
} | ||
}; | ||
if (request) { | ||
request.onupgradeneeded = function(event) { | ||
if (upgradeCallback) { | ||
upgradeCallback(new UpgradeDB(request.result, event.oldVersion, request.transaction)); | ||
} | ||
}; | ||
} | ||
@@ -299,0 +301,0 @@ return p.then(function(db) { |
{ | ||
"name": "idb", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "IndexedDB but with promises", | ||
@@ -5,0 +5,0 @@ "main": "lib/node.js", |
@@ -5,2 +5,20 @@ # IndexedDB Promised | ||
# Installation | ||
If you're using Rollup/Webpack or similar: | ||
```sh | ||
npm install idb | ||
``` | ||
Then in your JS: | ||
```js | ||
import idb from 'idb'; | ||
await idb.open(…); | ||
``` | ||
Or include [the script](https://github.com/jakearchibald/idb/blob/master/lib/idb.js) as it is, and `idb` will exist on the global scope. | ||
# Examples | ||
@@ -7,0 +25,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194157
697
391