storybook-addon-actions icon indicating copy to clipboard operation
storybook-addon-actions copied to clipboard

Circular json can possibly hang.

Open rhalff opened this issue 8 years ago • 3 comments

It can be replicated by replacing circular with something like window within:

https://github.com/kadirahq/storybook-addon-actions/blob/master/.storybook/stories.js#L20

The click on the circular button will cause the action to never be logged.

I've tried replacing json-stringify-safe with circular-json which seems to behave better. But even then after the 4th click circular-json will throw a circular reference error.

I now know how to circumvent this by just not logging something with circular references, however when this bug is encountered it's not immediately clear the hang originates from within storybook which makes one try to debug the application code itself first.

I think replacing json-stringify-safe with circular-json would already be an improvement.

rhalff avatar Nov 02 '16 02:11 rhalff

Also facing this problem... Wasted hours just to find out that storybook caused this. :cry:

leMaik avatar Nov 02 '16 18:11 leMaik

Also hit this issue.

jonnyelliot avatar Feb 16 '17 14:02 jonnyelliot

A PR fixing this would be super welcome! Would you care to give it a go @rhalff ?

ndelangen avatar Apr 05 '17 21:04 ndelangen