We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
untrack
1 parent a2d186e commit dd1cd06Copy full SHA for dd1cd06
.changeset/thick-ideas-mate.md
@@ -0,0 +1,5 @@
1
+---
2
+'@sveltejs/kit': patch
3
4
+
5
+fix: prevent access of Svelte 5-only `untrack` function
packages/kit/src/runtime/form-utils.svelte.js
@@ -3,7 +3,9 @@
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
import { DEV } from 'esm-env';
6
-import { untrack } from 'svelte';
+import * as svelte from 'svelte';
7
+// Svelte 4 and under don't have `untrack` - you'll not be able to use remote functions with Svelte 4 but this will still be loaded
8
+const untrack = svelte.untrack ?? ((value) => value());
9
10
/**
11
* Sets a value in a nested object using a path string, not mutating the original object but returning a new object
0 commit comments