fix(frontend): Safariでプラグインが複数ある場合に正常に読み込まれない問題を修正 (#10290)

* Safariでプラグインが複数ある場合に正常に読み込まれない問題を修正

* Update packages/frontend/src/init.ts

Co-authored-by: rinsuki <428rinsuki+git@gmail.com>

* Update packages/frontend/src/init.ts

Co-authored-by: rinsuki <428rinsuki+git@gmail.com>

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Co-authored-by: rinsuki <428rinsuki+git@gmail.com>
This commit is contained in:
(Fairy)Phy 2023-03-11 13:40:22 +09:00 committed by GitHub
parent 4094ab58aa
commit 488754437d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -343,7 +343,9 @@ stream.on('_disconnected_', async () => {
}); });
for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) { for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) {
import('./plugin').then(({ install }) => { import('./plugin').then(async ({ install }) => {
// Workaround for https://bugs.webkit.org/show_bug.cgi?id=242740
await new Promise(r => setTimeout(r, 0));
install(plugin); install(plugin);
}); });
} }