kaiju icon indicating copy to clipboard operation
kaiju copied to clipboard

Undefined identifier during component refresh

Open StephenEsser opened this issue 5 years ago • 0 comments

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

  1. Create a workspace
  2. Add multiple components into the workspace
  3. Repeatedly use the keyboard shortcuts for undo / redo
  4. Observe the refresh eventually throws an error.

StephenEsser avatar Feb 18 '19 14:02 StephenEsser