You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments