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
I am using this as part of Electron based application.
I am not sure if I am the only one, but I've encountered a duplicate state error when configuring this.
Error: State '${state.name}' is already defined
at StateQueueManager.register (/home/user/projects/project-electron/node_modules/@uirouter/core/lib/state/@uirouter/core/state/stateQueueManager.ts:35:15)
at StateRegistry.register (/home/user/projects/project-electron/node_modules/@uirouter/core/lib/state/@uirouter/core/state/stateRegistry.ts:128:28)
at eval (webpack-internal:///./node_modules/@uirouter/redux/lib/react/ConnectedUIRouter.js:30:49)
at Array.forEach (<anonymous>)
at ConnectedUIRouter (webpack-internal:///./node_modules/@uirouter/redux/lib/react/ConnectedUIRouter.js:29:12)
at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14803:18)
at mountIndeterminateComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17482:13)
at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:18596:16)
at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:188:14)
at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:237:16)
Upon further inspection it looks like ConnectedUIRouter registers states without checking for their existence first.
Hi there,
I am using this as part of Electron based application.
I am not sure if I am the only one, but I've encountered a duplicate state error when configuring this.
Upon further inspection it looks like
ConnectedUIRouter
registers states without checking for their existence first.Changing this:
https://github.com/ui-router/redux/blob/master/react/ConnectedUIRouter.tsx#L35-L37
to this:
works for me.
The text was updated successfully, but these errors were encountered: