Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
2e8d3ca7e8 | |||
dfb4a4f62a |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/webstore",
|
"name": "@pushrocks/webstore",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@pushrocks/webstore",
|
"name": "@pushrocks/webstore",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/webstore",
|
"name": "@pushrocks/webstore",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "high performance storage in the browser using indexed db",
|
"description": "high performance storage in the browser using indexed db",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/webstore',
|
name: '@pushrocks/webstore',
|
||||||
version: '2.0.2',
|
version: '2.0.3',
|
||||||
description: 'high performance storage in the browser using indexed db'
|
description: 'high performance storage in the browser using indexed db'
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,7 @@ export class WebStore<T = any> {
|
|||||||
|
|
||||||
const smartenv = new plugins.smartenv.Smartenv();
|
const smartenv = new plugins.smartenv.Smartenv();
|
||||||
if (!smartenv.isBrowser) {
|
if (!smartenv.isBrowser) {
|
||||||
const fetch = await smartenv.getSafeNodeModule('fake-indexeddb/auto.js');
|
await smartenv.getSafeNodeModule('fake-indexeddb/auto.js');
|
||||||
globalThis.fetch = fetch.default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.db = await plugins.idb.openDB(this.options.dbName, 1, {
|
this.db = await plugins.idb.openDB(this.options.dbName, 1, {
|
||||||
|
Reference in New Issue
Block a user