[Glitch] Fix unnecessary service worker registration and preloading when logged out

Port 9b878a14eb to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
lolsob-rspec
Claire 2022-11-10 20:26:04 +01:00
parent d4f1b79bcf
commit b5481c4ba2
1 changed files with 10 additions and 10 deletions

View File

@ -25,6 +25,7 @@ function main() {
import('flavours/glitch/initial_state'),
]);
if (me) {
const wb = new Workbox('/sw.js');
try {
@ -35,7 +36,6 @@ function main() {
return;
}
if (me) {
const registerPushNotifications = await import('flavours/glitch/actions/push_notifications');
store.dispatch(registerPushNotifications.register());