kaiju
kaiju copied to clipboard
Undefined identifier during component refresh
Issue Description
A refresh call is being made to an undefined component. This is likely due to queued undo / redo actions. We should prevent a user from stacking multiple refresh actions into a queue.
https://github.com/cerner/kaiju/blob/master/rails/client/app/bundles/kaiju/components/Component/utilities/dispatcher.js#L97
Error
undefined is not an object (evaluating 'fetch(id).url')
Issue Type
- [ ] New Feature
- [ ] Enhancement
- [X] Bug
- [ ] Other
Expected Behavior
Multiple refresh actions should not be queued. A new action should wait until the previous action is completed to prevent a call to refresh on an undefined component.
Current Behavior
The redux store may no longer contain a component and throws an error.
Steps to Reproduce
- Create a workspace
- Add multiple components into the workspace
- Repeatedly use the keyboard shortcuts for undo / redo
- Observe the refresh eventually throws an error.