Skip to content

Commit cb6afb0

Browse files
committed
dont try to read search params for prerendered error page
1 parent 8790a7a commit cb6afb0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/routes/+error.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script lang="ts">
22
import { page } from "$app/stores";
3-
import { browser } from "$app/environment";
3+
import { browser, building } from "$app/environment";
44
55
let alt = "\"This is Awkward\" - Thumbnail from March 12th, 2021"
66
7-
let attempt = Number($page.url.searchParams.get("attempt") ?? 0);
7+
let attempt = !building ? Number($page.url.searchParams.get("attempt") ?? 0) : 0;
88
99
const reloadPages = [
1010
"/",

0 commit comments

Comments
 (0)