1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Desktop: Empty note body has 0 line count (#2623)

Empty note body has 0 line count
This commit is contained in:
Jeremy Robertson 2020-03-01 09:39:11 -06:00 committed by GitHub
parent 299604838d
commit 8b22f03c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ export default function NoteContentPropertiesDialog(props:NoteContentPropertiesD
setCharacters(counter.all);
setCharactersNoSpace(counter.characters);
});
setLines(props.text.split('\n').length);
props.text === '' ? setLines(0) : setLines(props.text.split('\n').length);
}, [props.text]);
const textProperties: TextPropertiesMap = {