1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-17 20:51:20 +02:00

fix: undoing and redoing are switched (#3363)

This commit is contained in:
Corentin.Andre
2019-12-19 17:50:32 +01:00
committed by Ian Storm Taylor
parent 3ffd73cd7d
commit e54b07eba8

View File

@@ -697,8 +697,8 @@ export const Editable = (props: EditableProps) => {
if (Hotkeys.isRedo(nativeEvent)) { if (Hotkeys.isRedo(nativeEvent)) {
event.preventDefault() event.preventDefault()
if (editor.undo) { if (editor.redo) {
editor.undo() editor.redo()
} }
return return
@@ -707,8 +707,8 @@ export const Editable = (props: EditableProps) => {
if (Hotkeys.isUndo(nativeEvent)) { if (Hotkeys.isUndo(nativeEvent)) {
event.preventDefault() event.preventDefault()
if (editor.redo) { if (editor.undo) {
editor.redo() editor.undo()
} }
return return