Do not error when the tag does not exist

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2018-05-04 16:11:56 +02:00
parent 0579529145
commit a134bf7349
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,9 @@
},
formatSelection: function (tagId) {
var tag = OC.SystemTags.collection.get(tagId);
return OC.SystemTags.getDescriptiveTag(tag);
if (!_.isUndefined(tag)) {
return OC.SystemTags.getDescriptiveTag(tag);
}
},
escapeMarkup: function(m) {
return m;