Skip to content

Commit 1b84dfa

Browse files
committed
fix: correct context applied to batch_inspect
1 parent 02c6176 commit 1b84dfa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/twelve-worms-jog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: correct context applied to batch_inspect

packages/svelte/src/internal/client/runtime.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,14 @@ function is_runes(context) {
126126
*/
127127
export function batch_inspect(target, prop, receiver) {
128128
const value = Reflect.get(target, prop, receiver);
129+
/**
130+
* @this {any}
131+
*/
129132
return function () {
130133
const previously_batching_effect = is_batching_effect;
131134
is_batching_effect = true;
132135
try {
133-
return Reflect.apply(value, receiver, arguments);
136+
return Reflect.apply(value, this, arguments);
134137
} finally {
135138
is_batching_effect = previously_batching_effect;
136139
if (last_inspected_signal !== null) {

0 commit comments

Comments
 (0)