Skip to content

Commit 5eaa109

Browse files
authored
Merge pull request #2894 from crimx/patch-1
Fix crash if app is undefined
2 parents 2953b01 + e57cf20 commit 5eaa109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/output/themes/default/layouts/default.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const defaultLayout = (
101101
{/* settings, this appears to be a reasonable tradeoff between displaying page content without the */}
102102
{/* navigation on exceptionally slow connections and not having the navigation obviously repaint. */}
103103
<Raw html='document.body.style.display="none";' />
104-
<Raw html='setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)' />
104+
<Raw html='setTimeout(() => typeof app!=="undefined"?app.showPage():document.body.style.removeProperty("display"),500)' />
105105
</script>
106106
{context.toolbar(props)}
107107

0 commit comments

Comments
 (0)