Skip to content

Commit db5d27c

Browse files
authored
Merge pull request #9 from SourabhRanka/master
Fixing issue #8 Empty note should not be added to list
2 parents 19729d8 + 55d70f1 commit db5d27c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

index-mobile.html

+3
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ <h2>{{title}}</h2>
122122
let {
123123
text, title, color
124124
} = this.note
125+
if (text === '') {
126+
return ;
127+
}
125128
this.notes.push({
126129
text,
127130
date: new Date(Date.now()).toLocaleString(),

index.html

+3
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ <h2>{{title}}</h2>
157157
let {
158158
text, title, color
159159
} = this.note
160+
if (text === '') {
161+
return;
162+
}
160163
this.notes.push({
161164
text,
162165
date: new Date(Date.now()).toLocaleString(),

0 commit comments

Comments
 (0)