Skip to content

Commit

Permalink
[lexical-mark] Bug Fix: reverse ternary in MarkNode.addID (facebook#7020
Browse files Browse the repository at this point in the history
)
  • Loading branch information
james-atticus authored Jan 7, 2025
1 parent 7961130 commit 7de86e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lexical-mark/src/MarkNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class MarkNode extends ElementNode {

addID(id: string): this {
const self = this.getWritable();
return self.__ids.includes(id) ? self.setIDs([...self.__ids, id]) : self;
return self.__ids.includes(id) ? self : self.setIDs([...self.__ids, id]);
}

deleteID(id: string): this {
Expand Down

0 comments on commit 7de86e4

Please sign in to comment.