You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have defined a function to toggle text in my storybook component. On calling the function from button, application throws error "ButtonComponent.html:1 ERROR TypeError: _co.toggleLabel is not a function".
This error occurs only if I launch my application directly to that story URL, or reload page when that URL is already loaded. If I launch app at a different story URL and then visit the button story, the toggleLabel function gets called correctly.
Inspecting the code shows that when we load the application directly to the URL, args passed to Button.stories.ts at
Due to which the function defined in button.component.ts gets called.
To Reproduce
You can clone the repo for error reproduction here and rpm run storybook on master branch to reproduce the issue. The bugfix branch provides a temporary fix by deleting undefined keys from args using
Describe the bug
I have defined a function to toggle text in my storybook component. On calling the function from button, application throws error
"ButtonComponent.html:1 ERROR TypeError: _co.toggleLabel is not a function"
.This error occurs only if I launch my application directly to that story URL, or reload page when that URL is already loaded. If I launch app at a different story URL and then visit the button story, the toggleLabel function gets called correctly.
Inspecting the code shows that when we load the application directly to the URL, args passed to
Button.stories.ts
atare
However, args passed when we visit the URL after application is loaded at different URL are
Due to which the function defined in
button.component.ts
gets called.To Reproduce
You can clone the repo for error reproduction here and
rpm run storybook
on master branch to reproduce the issue. The bugfix branch provides a temporary fix by deleting undefined keys from args usingSystem
The text was updated successfully, but these errors were encountered: