From 47635955e07691b8bd9784867234acce7026f95d Mon Sep 17 00:00:00 2001 From: James Fitzsimmons <119275535+james-atticus@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:23:59 +1100 Subject: [PATCH] [lexical-mark] Bug Fix: reverse ternary in MarkNode.addID Ternary is the wrong way around. Introduced in https://github.com/facebook/lexical/commit/7c21d4ff39a6ede7dcbe061af17ec11b0ed48b2c#diff-b30867251dac89bfc41aba98899f9ca7e6b1045cc8bcfbcc9e9824caaf53d695R112-R122. --- packages/lexical-mark/src/MarkNode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lexical-mark/src/MarkNode.ts b/packages/lexical-mark/src/MarkNode.ts index 3db72b85239..a33097723dd 100644 --- a/packages/lexical-mark/src/MarkNode.ts +++ b/packages/lexical-mark/src/MarkNode.ts @@ -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 {