Skip to content

Commit

Permalink
Don't bother update recent tags if there's nothing to add
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Aug 2, 2016
1 parent c7f21eb commit 74d0c85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/assets/javascripts/moe-legacy/tag_completion.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ TagCompletionClass::load_data = (onComplete) ->

TagCompletionClass::observe_tag_changes_on_submit = (form, tags_field, old_tags_field) ->
form.on 'submit', (e) ->
TagCompletion?.add_recent_tags_from_update tags_field?.value, old_tags_field?.value
return if !TagCompletion? || !tags_field?.value

TagCompletion.add_recent_tags_from_update tags_field.value, old_tags_field?.value

### From a tag string, eg. "1`tagme`alias`alias2`", retrieve the tag name "tagme". ###

Expand Down

0 comments on commit 74d0c85

Please sign in to comment.