Undefined undoRedo in hot.instance

Tags: #<Tag:0x00007fee2bb8bcc8>

Hello Everyone.
On afterChange method. When i call a function inside when source is loadData. The undoRedo object is not present in the instance.

On loadData i have called the custom method. If i comment this method the undoRedo object is found. Even when i add any methods when source is loadData then error occur. Which lead to not finding the undoRedo object in the instance.

When undo from button or keyboard.
Error in event handler for "undoTurnsheet": "TypeError: Cannot read properties of undefined (reading 'isUndoAvailable')"

What seems to be the problem here.

Hi @prabin

the undoRedo plugin is set after the loadData() so if you run it via setTimeout() you’ll be able to get the plugin. Demo https://jsfiddle.net/80Lnwmks/

1 Like

It worked.

Thank you. Really appreciate you help.

I’m glad I was able to help. Please feel free to open a new thread if needed.

1 Like