chore: fix converting empty plaintext note with only spaces to super

This commit is contained in:
Aman Harwara
2023-11-06 14:52:03 +05:30
parent 56c522b5c3
commit 7a24ea3c25

View File

@@ -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
}