Skip to content

Commit

Permalink
fix: Typo in the collaboration nodes (#5702)
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-growthx authored Mar 12, 2024
1 parent 8d37645 commit 3dda2c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/lexical-yjs/src/CollabDecoratorNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions packages/lexical-yjs/src/CollabElementNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-yjs/src/CollabTextNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions scripts/error-codes/codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3dda2c5

Please sign in to comment.