mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-19 05:13:01 +00:00
Fix unnecessary service worker registration and preloading when logged out (#20341)
This commit is contained in:
parent
397845453e
commit
894ce3726a
|
@ -25,6 +25,7 @@ function main() {
|
||||||
import('mastodon/initial_state'),
|
import('mastodon/initial_state'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (me) {
|
||||||
const wb = new Workbox('/sw.js');
|
const wb = new Workbox('/sw.js');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -35,7 +36,6 @@ function main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me) {
|
|
||||||
const registerPushNotifications = await import('mastodon/actions/push_notifications');
|
const registerPushNotifications = await import('mastodon/actions/push_notifications');
|
||||||
|
|
||||||
store.dispatch(registerPushNotifications.register());
|
store.dispatch(registerPushNotifications.register());
|
||||||
|
|
Loading…
Reference in a new issue