Przeglądaj źródła

fix: transform error

Vincent Chan 2 lat temu
rodzic
commit
593cc253c2

+ 1 - 1
frontend/app_flowy/packages/flowy_editor/lib/operation/operation.dart

@@ -210,7 +210,7 @@ Operation transformOperation(Operation a, Operation b) {
   if (a is InsertOperation) {
   if (a is InsertOperation) {
     final newPath = transformPath(a.path, b.path);
     final newPath = transformPath(a.path, b.path);
     return b.copyWithPath(newPath);
     return b.copyWithPath(newPath);
-  } else if (b is DeleteOperation) {
+  } else if (a is DeleteOperation) {
     final newPath = transformPath(a.path, b.path, -1);
     final newPath = transformPath(a.path, b.path, -1);
     return b.copyWithPath(newPath);
     return b.copyWithPath(newPath);
   }
   }