mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
fix empty note creation
This commit is contained in:
@@ -128,7 +128,7 @@ const MergeEditor = () => {
|
||||
};
|
||||
|
||||
const onMessageFromPrimaryWebView = evt => {
|
||||
alert('helloworld');
|
||||
|
||||
if (evt.nativeEvent.data !== '') {
|
||||
let data = JSON.parse(evt.nativeEvent.data);
|
||||
primaryDelta = data.delta;
|
||||
|
||||
@@ -249,6 +249,9 @@ const Editor = ({noMenu}) => {
|
||||
const saveNote = async (lockNote = true) => {
|
||||
if (!canSave) return;
|
||||
if (!title && !content) return;
|
||||
if (content && content.text.trim().length === 0 && title && title.trim().length == 0) return;
|
||||
if (!content && title && title.trim().length === 0) return;
|
||||
if (!title && content && content.text.trim.length === 0) return;
|
||||
if (!content) {
|
||||
content = {
|
||||
text: '',
|
||||
|
||||
Reference in New Issue
Block a user