From a64acb0b5dfe9d9fa6f6e3f7e7c034f3b8143585 Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@estrogen.zone>
Date: Wed, 14 Jan 2026 18:12:16 +0100
Subject: fix: search not avail during prerender

---
 src/lib/blog/Post.svelte | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/lib/blog/Post.svelte')

diff --git a/src/lib/blog/Post.svelte b/src/lib/blog/Post.svelte
index ed1b929..9fcc319 100644
--- a/src/lib/blog/Post.svelte
+++ b/src/lib/blog/Post.svelte
@@ -3,7 +3,7 @@
 </script>
 
 <script lang="ts">
-  import { dev } from '$app/environment';
+  import { building, dev } from '$app/environment';
   import { page } from '$app/state';
 
   import { parsePostMetadata, type Post } from './Post';
@@ -21,7 +21,7 @@
   let PostComp = $derived(post.default);
 
   let ignorePublishedStatus = $derived(
-    page.url.searchParams.has('ignore-unpublished'),
+    !building && page.url.searchParams.has('ignore-unpublished'),
   );
 </script>
 
-- 
cgit v1.2.3

