fix: invalid null_aware_operator

pull/2067/head
CatHood0 9 months ago
parent 68de127c03
commit 27f5d5c63e
  1. 4
      lib/src/document/nodes/line.dart

@ -526,12 +526,12 @@ base class Line extends QuillContainer<Leaf?> {
// By default getCopyCutAction just return the same operation // By default getCopyCutAction just return the same operation
// returning Embed.kObjectReplacementCharacter for the buffer // returning Embed.kObjectReplacementCharacter for the buffer
final action = provider.getCopyCutAction(embed.type); final action = provider.getCopyCutAction(embed.type);
final data = action?.call(embed.data); final data = action.call(embed.data);
if (data is String && data != Embed.kObjectReplacementCharacter) { if (data is String && data != Embed.kObjectReplacementCharacter) {
buffer.write(data); buffer.write(data);
return remaining; return remaining;
} else { } else {
buffer.write(action?.call(data)); buffer.write(action.call(data));
} }
return remaining - node.length; return remaining - node.length;
} }

Loading…
Cancel
Save