Skip to content

Commit c4182f5

Browse files
committed
simplify
1 parent bde0252 commit c4182f5

File tree

1 file changed

+1
-4
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+1
-4
lines changed

packages/svelte/src/internal/client/reactivity/sources.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,7 @@ export function internal_set(source, value) {
186186

187187
if (typeof old_value === 'object' && old_value != null && source.o) {
188188
// @ts-ignore
189-
const remove = old_value[PROXY_ONCHANGE_SYMBOL];
190-
if (remove && typeof remove === 'function') {
191-
remove(source.o, true);
192-
}
189+
old_value[PROXY_ONCHANGE_SYMBOL]?.(source.o, true);
193190
}
194191

195192
if (is_destroying_effect) {

0 commit comments

Comments
 (0)