You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the last update (svelte@5.0.0-next.206), svelte throws an error saying getContext is undefined if getContext was called in a svelte.ts file. works fine in next.205
<scriptlang="ts">
import { fetchContext } from"./test.svelte";const result =fetchContext();
</script>
Logs
client.js?v=731e5348:299 Uncaught (in promise)
ReferenceError: getContext is not defined
at fetchContext (test.svelte.ts:4:16)
at Child (Child.svelte:4:18)
at chunk-KRQXFADS.js?v=731e5348:209:58
at update_reaction (chunk-IUDHG5ZN.js?v=731e5348:1093:23)
at update_effect (chunk-IUDHG5ZN.js?v=731e5348:1213:21)
at create_effect (chunk-IUDHG5ZN.js?v=731e5348:274:7)
at branch (chunk-IUDHG5ZN.js?v=731e5348:398:10)
at chunk-KRQXFADS.js?v=731e5348:202:17
at update_reaction (chunk-IUDHG5ZN.js?v=731e5348:1093:23)
at :5174/update_effect …text is not defined
at fetchContext (test.svelte.ts:4:16)
at Child (Child.svelte:4:18)
at chunk-KRQXFADS.js?v=731e5348:209:58
at update_reaction (chunk-IUDHG5ZN.js?v=731e5348:1093:23)
at update_effect (chunk-IUDHG5ZN.js?v=731e5348:1213:21)
at create_effect (chunk-IUDHG5ZN.js?v=731e5348:274:7)
at branch (chunk-IUDHG5ZN.js?v=731e5348:398:10)
at chunk-KRQXFADS.js?v=731e5348:202:17
at update_reaction (chunk-IUDHG5ZN.js?v=731e5348:1093:23)
at update_effect (chunk-IUDHG5ZN.js?v=731e5348:1213:21)
Describe the bug
Since the last update (svelte@5.0.0-next.206), svelte throws an error saying getContext is undefined if getContext was called in a svelte.ts file. works fine in next.205
Reproduction
test.svelte.ts
Child.svelte
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: