Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.6k
fix: better handle $inspect on array mutations#16389
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
changeset-botbot commentedJul 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🦋 Changeset detectedLatest commit:5273f70 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 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
love this fix
6cf3a19
intomainUh oh!
There was an error while loading.Please reload this page.
Fixes#16375, and now $inspect is called only once per array-mutating method.
I guess nobody will do something like
or in another way make the methods throwable because it's shooting into one's own leg.
Also,
Array.prototype.shift.call(arr)
will still trigger $inspect on each step. But patching the Array prototype is too much?About the test
inspect-console-trace
- the error stack was expected to haveat HTMLButtonElement.<anonymous> (path)
but now it isn't in the last 10 stack calls.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.packages/svelte/src
, add a changeset (npx changeset
).Tests and linting
pnpm test
and lint the project withpnpm lint