Skip to content

Commit 41a7ee3

Browse files
Release version 3.0.4
1 parent 6149b00 commit 41a7ee3

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## 3.0.4
10+
11+
* New attempt at removing ServiceWorker
12+
913
## 3.0.3
1014

1115
* Fable fixes

src/App/Loader.fs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,6 @@ let private view (model: Model) dispatch =
104104
]
105105
]
106106

107-
#if !DEBUG
108-
open Fable.Core
109-
open Fable.Core.JsInterop
110-
111-
let [<Global>] navigator: obj = jsNative
112-
let [<Emit("$0 in $1")>] hasField (key: string) (o: obj): bool = jsNative
113-
if hasField "serviceWorker" navigator then
114-
navigator?serviceWorker?register("./service-worker.js")
115-
?``then``(fun registration -> registration?unregister())
116-
#endif
117-
118107
open Elmish.React
119108
// open Elmish.HMR
120109
open Elmish.Navigation

src/App/Prelude.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ open Fable.Core
66

77
[<RequireQualifiedAccess>]
88
module Literals =
9-
let [<Literal>] REPL_VERSION = "3.0.3" // Do not edit manually
9+
let [<Literal>] REPL_VERSION = "3.0.4" // Do not edit manually
1010
let [<Literal>] STORAGE_KEY = "fable-repl"
1111
let [<Literal>] MAX_LOGS_LENGTH = 200
1212
// let [<Literal>] HOST =

src/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,14 @@
99
</head>
1010
<body>
1111
<div id="app-container"></div>
12+
<script>
13+
if(window.navigator && navigator.serviceWorker) {
14+
navigator.serviceWorker.getRegistrations().then(function(registrations) {
15+
for(let registration of registrations) {
16+
registration.unregister();
17+
}
18+
});
19+
}
20+
</script>
1221
</body>
1322
</html>

0 commit comments

Comments
 (0)