chore: fix converting empty plaintext note with only spaces to super
This commit is contained in:
@@ -22,7 +22,7 @@ export default function ImportPlugin({
|
|||||||
const [editor] = useLexicalComposerContext()
|
const [editor] = useLexicalComposerContext()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const dontAllowConversionOfEmptyStringWhichWouldResultInError = text.length === 0
|
const dontAllowConversionOfEmptyStringWhichWouldResultInError = text.trim().length === 0
|
||||||
if (dontAllowConversionOfEmptyStringWhichWouldResultInError) {
|
if (dontAllowConversionOfEmptyStringWhichWouldResultInError) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user