0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-17 22:44:24 -05:00

[Toolbar] fix issue where requestIdleCallback would take forever (#9302)

This commit is contained in:
Fred K. Schott 2023-12-05 03:02:34 -08:00 committed by GitHub
parent 4b9d657ff2
commit 9807582b69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,7 +281,7 @@ export class AstroDevOverlay extends HTMLElement {
if ('requestIdleCallback' in window) {
window.requestIdleCallback(async () => {
this.plugins.map((plugin) => this.initPlugin(plugin));
});
}, {timeout: 300});
} else {
setTimeout(async () => {
this.plugins.map((plugin) => this.initPlugin(plugin));