delete undefined tag

This commit is contained in:
Mo Bitar
2017-01-29 00:04:56 -06:00
parent 79f8430d56
commit 5ec6fc4831
3 changed files with 16 additions and 10 deletions

View File

@@ -56,6 +56,11 @@ angular.module('app.frontend')
}
$scope.tagsSave = function(tag, callback) {
console.log("saving tag", tag);
if(!tag.title || tag.title.length == 0) {
$scope.notesRemoveTag(tag);
return;
}
tag.setDirty(true);
syncManager.sync(callback);
}