diff --git a/src/runtime/index.ts b/src/runtime/index.ts index 74a8ef5..6146ad8 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -298,7 +298,7 @@ async function navigate(target: Target, id: number): Promise { await goto(redirect.location, { replaceState: true }); } else { render(data, nullable_depth, scroll_history[id], token); - document.activeElement.blur(); + if (document.activeElement) document.activeElement.blur(); } }