79336887

Date: 2025-01-07 17:46:53
Score: 0.5
Natty:
Report link

If you run into this error for adapter-static / SSG, you can detect the build process via building and avoid accessing page.url.searchParams while building:

<script>
import { building } from '$app/environment';

let results = $derived.by(() => {
    const searchText = !building ? page.url.searchParams.get('searchText') || "" : "";

Thanks very much to Scott (Svelte Discord)

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: m_andrasch