Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information