-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Bug]: Objects get polluted with _constructor-name_ key #21616
Comments
@Haroenv Thanks for reporting. Unfortunately Storybook 5.3 is three years old and we are no longer updating it. I'd recommend updating to 7.0 to get Storybook's latest and greatest. If the problem is still happening we'd be happy to help debug. Migration guide: https://storybook.js.org/migration-guides/7.0 |
Can't reproduce this anymore / consistently indeed :) |
This continues happening with version 7.1.0 when you have objects generated from a JSON using
|
I also seem to be getting this error |
Yep, me too, having the same bug with 7.1.1 in a big story. Didn't manage to narrow it down yet but I can provide information if needed |
Can this issue be re-opened? I'm also getting this error after upgrading from 7.0.8 to 7.1.1. Storybook builds just fine, but then if I change the code and it gets reloaded, I get this error. Also can provide more information if needed. |
@robkroll Can you verify whether the issue also happens with the latest Storybook? (7.5.3) |
I'm seeing this with a component I'm building that displays results from getOwnPropertyKeys(). One the first render the keys look correct, but on a component update I start seeing I can't see what's adding these properties, but for working on an object inspector component, it's pretty bad to have Storybook mess with the shape of the object in the stories. Can we re-open this bug? |
Looks like the problem is here: https://github.com/storybookjs/telejson/blob/d4d6cd0574a7d866e082e4f964c9e34c0d8ee037/src/index.ts#L298 There's no issue on telejson yet |
Describe the bug
Unfortunately I can't figure out what's causing this, but some of my network requests get called with
_constructor-name_: SearchParameters
, which I know is the name of a class. Normally those calls should have been using JSON.stringify, and not have the contstructor name injected. I believe this could be related with https://github.com/storybookjs/telejson?I can't reproduce this consistently, usually on a reload it doesn't occur anymore.
To Reproduce
https://github.com/algolia/instantsearch/tree/master/packages/instantsearch.js is one repo I can reproduce this in by interacting in the iframe
System
Additional context
I believe telejson might add info to objects that get logged(?) or otherwise processed by storybook, which changes its behaviour when serialising. This definitely must be conditional, maybe on hot reload, as I can't reproduce it consistently.
The text was updated successfully, but these errors were encountered: