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
After the router redirects you to any of the stories, the error is triggered.
Open the developers console and see the error: TypeError: Cannot read property 'id' of undefined
Expected behavior
Run the project and don't show an error during the router changes from root path to stories path.
Screenshots
Code snippets
The issue is located at register.ts due to the id variable is undefined.
api.on(STORY_MISSING, ({ id }: { id: string }) => { //<-- id is undefined here
ReactGA.exception({
description: `attempted to render ${id}, but it is missing`,
fatal: false,
});
});
System:
OS: MacOS
Device: Macbook Pro Retina
Browser: Chrome, Safari, Firefox
Framework: react
Addons: addon-google-analytics
Version: v5.1.9
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
The plugin trigger an error exception when there are missed stories.
To Reproduce
Steps to reproduce the behavior:
addons.js
(import '@storybook/addon-google-analytics/register';
)TypeError: Cannot read property 'id' of undefined
Expected behavior
Run the project and don't show an error during the router changes from root path to stories path.
Screenshots
Code snippets
The issue is located at
register.ts
due to theid
variable is undefined.System:
Additional context
The text was updated successfully, but these errors were encountered: