fix: ensure inspect fires on prop changes (#10468)

* fix: ensure inspect fires on prop changes

* fix: ensure inspect fires on prop changes

* fix: ensure inspect fires on prop changes
pull/10474/head
Dominic Gannaway 9 months ago committed by GitHub
parent 9129d2f138
commit 1b56a3219c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"svelte": patch
---
fix: ensure inspect fires on prop changes

@ -1646,7 +1646,8 @@ export function prop(props, key, flags, initial) {
var current = get(current_value);
// legacy nonsense — need to ensure the source is invalidated when necessary
if (is_signals_recorded) {
// also needed for when handling inspect logic so we can inspect the correct source signal
if (is_signals_recorded || (DEV && inspect_fn)) {
// set this so that we don't reset to the parent value if `d`
// is invalidated because of `invalidate_inner_signals` (rather
// than because the parent or child value changed)

Loading…
Cancel
Save