@dxos/react-ui-editor 0.6.1-main.23da23a → 0.6.1-main.4211093
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1520,7 +1520,7 @@ var commentsDecorations = EditorView7.decorations.compute([
|
|
|
1520
1520
|
const { selection: { current }, comments: comments2 } = state2.field(commentsState);
|
|
1521
1521
|
const decorations = sortBy(comments2 ?? [], (range) => range.range.from)?.flatMap((comment) => {
|
|
1522
1522
|
const range = comment.range;
|
|
1523
|
-
if (!range) {
|
|
1523
|
+
if (!range || range.from === range.to) {
|
|
1524
1524
|
log4.warn("Invalid range:", range, {
|
|
1525
1525
|
F: __dxlog_file6,
|
|
1526
1526
|
L: 141,
|
|
@@ -1528,8 +1528,6 @@ var commentsDecorations = EditorView7.decorations.compute([
|
|
|
1528
1528
|
C: (f, a) => f(...a)
|
|
1529
1529
|
});
|
|
1530
1530
|
return void 0;
|
|
1531
|
-
} else if (range.from === range.to) {
|
|
1532
|
-
return void 0;
|
|
1533
1531
|
}
|
|
1534
1532
|
if (comment.comment.id === current) {
|
|
1535
1533
|
return commentCurrentMark.range(range.from, range.to);
|