Skip to content

Commit

Permalink
Update packages/lexical/src/LexicalNode.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Bob Ippolito <[email protected]>
  • Loading branch information
GermanJablo and etrepum authored Jan 31, 2025
1 parent 47435b0 commit fb7e164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lexical/src/LexicalNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class LexicalNode {
getState<T extends StateKey>(k: T): T['value'] {
const self = this.getLatest();
// If the state is not set, return the default value
return self.__state[k.key] ?? k.parse(undefined);
return k.parse(self.__state[k.key]);
}

setState<T extends StateKey>(k: T, v: T['value']): this {
Expand Down

0 comments on commit fb7e164

Please sign in to comment.