From c663540f39eaa0173a6466954cd436ca2aed9d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Jablo=C3=B1ski?= <43938777+GermanJablo@users.noreply.github.com> Date: Fri, 31 Jan 2025 13:33:59 -0300 Subject: [PATCH] fix type --- packages/lexical/src/LexicalNode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lexical/src/LexicalNode.ts b/packages/lexical/src/LexicalNode.ts index ed259c9440c..f3239c5b74b 100644 --- a/packages/lexical/src/LexicalNode.ts +++ b/packages/lexical/src/LexicalNode.ts @@ -932,7 +932,7 @@ export class LexicalNode { return { type: this.__type, version: 1, - ...(objetcIsEmpty(this.__state) ? {} : {state: this.__state}), + ...(objectIsEmpty(this.__state) ? {} : {state: this.__state}), }; } @@ -1343,7 +1343,7 @@ export function insertRangeAfter( * The best way to check if an object is empty in O(1) * @see https://stackoverflow.com/a/59787784/10476393 */ -function objetcIsEmpty(obj: object) { +function objectIsEmpty(obj: object) { for (const key in obj) { return false; }