diff --git a/lib/src/models/documents/document.dart b/lib/src/models/documents/document.dart index 99a72e7a..6043b6f9 100644 --- a/lib/src/models/documents/document.dart +++ b/lib/src/models/documents/document.dart @@ -334,10 +334,7 @@ class Document { } catch (e) { throw StateError('_delta compose failed'); } - - if (_delta != _root.toDelta()) { - throw StateError('Compose failed'); - } + assert(_delta == _root.toDelta(), 'Compose failed'); final change = DocChange(originalDelta, delta, changeSource); documentChangeObserver.add(change); history.handleDocChange(change); @@ -422,7 +419,6 @@ class Document { doc.toString(), 'Document Delta cannot be empty.'); } - // print(doc.last.data.runtimeType); assert((doc.last.data as String).endsWith('\n')); var offset = 0;