-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: ensure $inspect works with SvelteMap and SvelteSet #12994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 85a73b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
I realize it's just a handful of bytes, but are there other common use cases besides |
It's an odd one too. |
With this PR, the behaviour of this code will differ between dev and prod: $effect(() => {
console.log('map snapshot', $state.snapshot(map));
}); We can't have that. I think we should just trigger the relevant reactivity inside if (value instanceof Map) new Map(value);
if (value instanceof Set) new Set(value); |
Turns out that we broke
$inspect
at some point and it stopped working with SvelteMap and SvelteSet. This fixes that.