Commit 1bfc2a4f authored by gergely-ujvari's avatar gergely-ujvari

Merge pull request #1489 from hypothesis/delete-empty-tag

Fix error when pressing delete in empty tag field
parents ea74bd2e 64d33aba
......@@ -226,6 +226,7 @@ annotation = ['$filter', '$parse', 'annotator', ($filter, $parse, annotator) ->
scope.model.tags.push(tag.text)
scope.removeTag = (tag) ->
if tag and scope.model.tags
scope.model.tags = scope.model.tags.filter((t) -> t isnt tag.text)
delete scope.model.tags if scope.model.tags.length is 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment