Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Oct 14, 2024

Fixes #13577. If we encounter a runtime exception when getting the values for an inspection we bail out reporting the inspection. This can occur naturally because inspect effects are run sync, and thus they can operate before a parent render effect runs that would have invalidated the inspect effect had they not be sync.

@changeset-bot
Copy link

changeset-bot bot commented Oct 14, 2024

🦋 Changeset detected

Latest commit: d412d69

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@trueadm
Copy link
Contributor Author

trueadm commented Oct 17, 2024

@Rich-Harris and I spoke about this PR and the behaviour of swallowing possible user-errors from the inspection. We decided on the behaviour being that we always console.error the error so it's at least known about – whilst keeping the catch so that execution doesn't break from the inspection.

@trueadm trueadm merged commit e21e624 into main Oct 17, 2024
7 checks passed
@trueadm trueadm deleted the inspect-catch-exception branch October 17, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Svelte5: $inspect fails when an nested array/object inside state is not present after state update

3 participants