From 7a24ea3c250d89c71d6f00f6af4996ab7466ed71 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Mon, 6 Nov 2023 14:52:03 +0530 Subject: [PATCH] chore: fix converting empty plaintext note with only spaces to super --- .../SuperEditor/Plugins/ImportPlugin/ImportPlugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ImportPlugin/ImportPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ImportPlugin/ImportPlugin.tsx index 07272a699..9a9c677c1 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ImportPlugin/ImportPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ImportPlugin/ImportPlugin.tsx @@ -22,7 +22,7 @@ export default function ImportPlugin({ const [editor] = useLexicalComposerContext() useEffect(() => { - const dontAllowConversionOfEmptyStringWhichWouldResultInError = text.length === 0 + const dontAllowConversionOfEmptyStringWhichWouldResultInError = text.trim().length === 0 if (dontAllowConversionOfEmptyStringWhichWouldResultInError) { return }