I have a plugin that has the following code:
new Plugin({
view(view) {
return {
destroy() {
saveEditorState(props.textItem.id, view);
}
};
}
})
This has worked for a long time, but I am upgrading webpack and something changed that no longer allows my saveEditorState
function to complete execution before the node is removed from the DOM. Unfortunately, I need the node to be in the DOM while my function is running.
Is there something I can do to make sure my function is run while the node is still in the DOM?
Thanks!