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
Copy file name to clipboardExpand all lines: packages/svelte/messages/client-errors/errors.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,10 @@ See the [migration guide](/docs/svelte/v5-migration-guide#Components-are-no-long
54
54
55
55
> `%rune%` can only be used inside an effect (e.g. during component initialisation)
56
56
57
+
## effect_pending_outside_reaction
58
+
59
+
> `$effect.pending()` can only be called inside an effect or derived
60
+
57
61
## effect_update_depth_exceeded
58
62
59
63
> Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
Copy file name to clipboardExpand all lines: packages/svelte/src/internal/client/errors.js
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
import{DEV}from'esm-env';
4
4
5
+
export*from'../shared/errors.js';
6
+
5
7
/**
6
8
* Cannot create a `$derived(...)` with an `await` expression outside of an effect tree
7
9
* @returns {never}
@@ -195,6 +197,22 @@ export function effect_orphan(rune) {
195
197
}
196
198
}
197
199
200
+
/**
201
+
* `$effect.pending()` can only be called inside an effect or derived
202
+
* @returns {never}
203
+
*/
204
+
exportfunctioneffect_pending_outside_reaction(){
205
+
if(DEV){
206
+
consterror=newError(`effect_pending_outside_reaction\n\`$effect.pending()\` can only be called inside an effect or derived\nhttps://svelte.dev/e/effect_pending_outside_reaction`);
* Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
0 commit comments