@live-change/db-store-localstorage 0.6.4 → 0.6.5
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/lib/storage.js +5 -2
- package/package.json +3 -3
package/lib/storage.js
CHANGED
|
@@ -146,12 +146,15 @@ if(typeof window == 'undefined') {
|
|
|
146
146
|
window.browser = chrome.extension
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
if (isExtension) {
|
|
149
|
+
if (isExtension && browser.storage) {
|
|
150
150
|
local = useExtensionStorage(browser.storage.local)
|
|
151
151
|
session = useExtensionStorage(browser.storage.session)
|
|
152
|
-
} else {
|
|
152
|
+
} else if(typeof window != 'undefined' && window.localStorage && window.sessionStorage) {
|
|
153
153
|
local = useWebStorage(window.localStorage)
|
|
154
154
|
session = useWebStorage(window.sessionStorage)
|
|
155
|
+
} else {
|
|
156
|
+
local = null
|
|
157
|
+
session = null
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-store-localstorage",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Database with observable data for live queries",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"tape": "^5.3.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@live-change/dao": "0.5.
|
|
29
|
+
"@live-change/dao": "0.5.17",
|
|
30
30
|
"@live-change/interval-tree": "^1.0.12",
|
|
31
31
|
"broadcast-channel": "^4.2.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "59500898eff7eba564a06bec348cb34965b38b0a"
|
|
34
34
|
}
|