diff --git a/src/scripts/object.js b/src/scripts/object.js index 4b43a5f..d818e1a 100644 --- a/src/scripts/object.js +++ b/src/scripts/object.js @@ -216,7 +216,7 @@ export class Folder extends BaseNode { return `
{ let isFromNav = navigate; let path = window.location.pathname; @@ -234,11 +234,15 @@ export class Folder extends BaseNode { } setTimeout(() => active?.scrollIntoView( { behavior: 'smooth', block: 'center' }), 150); + }; + router.on('ready', () => { + react(); }); router.on('navigate', () => { navigate = true; - setTimeout(() => navigate = false, 100); - })" + $nextTick(() => navigate = false); + }); + $nextTick(() => react())" >${html}
`; } diff --git a/src/scripts/router.js b/src/scripts/router.js index 1f2c8c3..d78678a 100644 --- a/src/scripts/router.js +++ b/src/scripts/router.js @@ -19,7 +19,7 @@ export default { if (! this.route(path)) { if (! Routes.error) this.emit('error'); - return this.goto(Routes.error); + else this.goto(Routes.error); } this.emit('ready'); diff --git a/src/scripts/search.js b/src/scripts/search.js index 6e1127b..81e730b 100644 --- a/src/scripts/search.js +++ b/src/scripts/search.js @@ -39,7 +39,7 @@ export class Engine { placeholder="Search page or heading..." > -
+