Commit cc7ab25
committed
Fix update-worker breakage caused by use of Window in desktop API code
Window is not defined in service workers. The service worker code does
import service-versions though, which in turn imports desktop-apis.
This is a quick fix for this issue, avoiding directly depending on
'window' which results in the update-worker failing to run.
It would be better to avoid loading this file entirely, using a dynamic
import or something more thorough, but Webpack v4 seems to fail to
handle dynamic imports in this case, so that's not possible for now.
It would be even better to solve this more structurally - e.g. checking
the service worker actually installs OK in a test - but that's hard and
this fixes the immediate production issue for now.1 parent bd9d252 commit cc7ab25
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
0 commit comments