From 216dbaedaf587db834cfdd53b896e9c7e1284d9c Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Tue, 4 Oct 2022 01:15:47 +0900 Subject: Disable push notification when not logged in (#19272) --- app/javascript/packs/application.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/javascript/packs') diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 91240aecf..0851f69b6 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -4,8 +4,10 @@ import { start } from '../mastodon/common'; start(); -loadPolyfills().then(() => { - require('../mastodon/main').default(); +loadPolyfills().then(async () => { + const { default: main } = import('mastodon/main'); + + return main(); }).catch(e => { console.error(e); }); -- cgit