Skip to content

Commit ebe3ceb

Browse files
committed
fix: remove key error
1 parent f75d061 commit ebe3ceb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/desktop_toolbar/link/link_extension.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ extension LinkExtension on EditorState {
88
if (node == null) {
99
return;
1010
}
11-
final attributes = _getAttribute(node, selection)
12-
..remove(BuiltInAttributeKey.href)
13-
..remove(kIsPageLink);
11+
final attributes = _getAttribute(node, selection);
12+
attributes.remove(BuiltInAttributeKey.href);
13+
attributes.remove(kIsPageLink);
1414
final index = selection.normalized.startIndex;
1515
final length = selection.length;
1616
final transaction = this.transaction
@@ -42,9 +42,9 @@ extension LinkExtension on EditorState {
4242
if (node == null) {
4343
return;
4444
}
45-
final attributes = _getAttribute(node, selection)
46-
..remove(BuiltInAttributeKey.href)
47-
..remove(kIsPageLink);
45+
final attributes = _getAttribute(node, selection);
46+
attributes.remove(BuiltInAttributeKey.href);
47+
attributes.remove(kIsPageLink);
4848
final index = selection.normalized.startIndex;
4949
final length = selection.length;
5050
final transaction = this.transaction

0 commit comments

Comments
 (0)