fix attributes compare (#486)

pull/487/head
Andy Trand 3 years ago committed by GitHub
parent 477f3fc72f
commit 1d5c7a5314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      lib/src/models/quill_delta.dart

@ -150,6 +150,11 @@ class Operation {
/// Returns `true` if [other] operation has the same attributes as this one.
bool hasSameAttributes(Operation other) {
// treat null and empty equal
if ((_attributes?.isEmpty ?? true) &&
(other._attributes?.isEmpty ?? true)) {
return true;
}
return _attributeEquality.equals(_attributes, other._attributes);
}

Loading…
Cancel
Save