@cocreate/pwa 1.3.15 → 1.3.16
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/index.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.3.16](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.3.15...v1.3.16) (2022-12-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump dependencies ([d00c28c](https://github.com/CoCreate-app/CoCreate-pwa/commit/d00c28cf3e7c2f54f9abf9d39c8c6f2beeda5ca7))
|
|
7
|
+
* set defualt serviceworker path if not defined ([16cfd4c](https://github.com/CoCreate-app/CoCreate-pwa/commit/16cfd4c4c8ab7d12b59699dc15d4314ae467729e))
|
|
8
|
+
|
|
1
9
|
## [1.3.15](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.3.14...v1.3.15) (2022-12-04)
|
|
2
10
|
|
|
3
11
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -59,13 +59,13 @@ async function persistData() {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
if ('serviceWorker' in navigator) {
|
|
62
|
-
let workerPath
|
|
63
|
-
if (window.CoCreateConfig && window.CoCreateConfig.serviceWorker)
|
|
62
|
+
let workerPath
|
|
63
|
+
if (window.CoCreateConfig && window.CoCreateConfig.serviceWorker)
|
|
64
64
|
workerPath = window.CoCreateConfig.serviceWorker
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
else
|
|
66
|
+
workerPath = window.localStorage.getItem("serviceWorker") || '/sw.js'
|
|
67
|
+
|
|
68
|
+
window.localStorage.setItem("serviceWorker", workerPath);
|
|
69
69
|
|
|
70
70
|
let isPwa = true
|
|
71
71
|
if (workerPath) {
|