in toolbarFunctions.js around line 177:
const undo = (state) => {
if (getGraphFun(state)) getGraphFun(state).undo(); // has guard
};
const redo = (state) => {
getGraphFun(state).redo(); // no guard
};
undo checks if graph exists before calling .undo(), redo just yolos it. will throw if curGraphInstance is null/undefined. probably just copy-paste miss when these were written.
fix could be,,. add the same if (getGraphFun(state)) check