From 3dda2c569a560b90dfd615fe21a0e8421eccffd4 Mon Sep 17 00:00:00 2001 From: Pranav Bakre <108714874+pranav-growthx@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:34:34 +0530 Subject: [PATCH] fix: Typo in the collaboration nodes (#5702) --- packages/lexical-yjs/src/CollabDecoratorNode.ts | 2 +- packages/lexical-yjs/src/CollabElementNode.ts | 6 +++--- packages/lexical-yjs/src/CollabTextNode.ts | 2 +- scripts/error-codes/codes.json | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/lexical-yjs/src/CollabDecoratorNode.ts b/packages/lexical-yjs/src/CollabDecoratorNode.ts index a91e23ce924..f79384cbfc3 100644 --- a/packages/lexical-yjs/src/CollabDecoratorNode.ts +++ b/packages/lexical-yjs/src/CollabDecoratorNode.ts @@ -87,7 +87,7 @@ export class CollabDecoratorNode { const lexicalNode = this.getNode(); invariant( lexicalNode !== null, - 'syncPropertiesFromYjs: cound not find decorator node', + 'syncPropertiesFromYjs: could not find decorator node', ); const xmlElem = this._xmlElem; syncPropertiesFromYjs(binding, xmlElem, lexicalNode, keysChanged); diff --git a/packages/lexical-yjs/src/CollabElementNode.ts b/packages/lexical-yjs/src/CollabElementNode.ts index 754364e9b61..2412cba844b 100644 --- a/packages/lexical-yjs/src/CollabElementNode.ts +++ b/packages/lexical-yjs/src/CollabElementNode.ts @@ -99,7 +99,7 @@ export class CollabElementNode { const collabElementNode = this._parent; invariant( collabElementNode !== null, - 'getOffset: cound not find collab element node', + 'getOffset: could not find collab element node', ); return collabElementNode.getChildOffset(this); @@ -112,7 +112,7 @@ export class CollabElementNode { const lexicalNode = this.getNode(); invariant( lexicalNode !== null, - 'syncPropertiesFromYjs: cound not find element node', + 'syncPropertiesFromYjs: could not find element node', ); syncPropertiesFromYjs(binding, this._xmlText, lexicalNode, keysChanged); } @@ -232,7 +232,7 @@ export class CollabElementNode { const lexicalNode = this.getNode(); invariant( lexicalNode !== null, - 'syncChildrenFromYjs: cound not find element node', + 'syncChildrenFromYjs: could not find element node', ); const key = lexicalNode.__key; diff --git a/packages/lexical-yjs/src/CollabTextNode.ts b/packages/lexical-yjs/src/CollabTextNode.ts index 6c54c1123da..15514e1b1f4 100644 --- a/packages/lexical-yjs/src/CollabTextNode.ts +++ b/packages/lexical-yjs/src/CollabTextNode.ts @@ -147,7 +147,7 @@ export class CollabTextNode { const lexicalNode = this.getNode(); invariant( lexicalNode !== null, - 'syncPropertiesAndTextFromYjs: cound not find decorator node', + 'syncPropertiesAndTextFromYjs: could not find decorator node', ); syncPropertiesFromYjs(binding, this._map, lexicalNode, keysChanged); diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index 5741ecac5a6..ce712687999 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -82,16 +82,16 @@ "80": "Create node: Attempted to create node %s that was not configured to be used on the editor.", "81": "createBinding: doc is null or undefined", "82": "Expected text, element, or decorator event", - "83": "syncPropertiesFromYjs: cound not find decorator node", - "84": "syncPropertiesAndTextFromYjs: cound not find decorator node", + "83": "syncPropertiesFromYjs: could not find decorator node", + "84": "syncPropertiesAndTextFromYjs: could not find decorator node", "85": "could not find node by key", "86": "Expected text, element, decorator, or linebreak node", "87": "Expected shared type to include type attribute", "88": "Node %s is not registered", "89": "Expected parent to be a collab element node", - "90": "getOffset: cound not find collab element node", - "91": "syncPropertiesFromYjs: cound not find element node", - "92": "syncChildrenFromYjs: cound not find element node", + "90": "getOffset: could not find collab element node", + "91": "syncPropertiesFromYjs: could not find element node", + "92": "syncChildrenFromYjs: could not find element node", "93": "syncChildrenFromYjs: expected text, element, decorator, or linebreak collab node", "94": "splice: could not find collab element node", "95": "splice: expected offset to be greater than zero",