Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return ({ command }) => {
switch (command) {
case 'undo':
return undoDepth(getState()) > 0;
case 'redo':
return redoDepth(getState()) > 0;
default:
return false;
}
};
}
return ({ command }: { command?: string }) => {
switch (command) {
case 'undo':
return undoDepth(getState()) > 0;
case 'redo':
return redoDepth(getState()) > 0;
default:
return false;
}
};
}