Skip to content

Commit

Permalink
Fixed .andSelf() deprecated issue aehlke#396
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Wielemaker authored and Jan Wielemaker committed Apr 29, 2018
1 parent 6ccd2de commit f668b90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/tag-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@
this.options.singleFieldNode = this.element;
this.element.addClass('tagit-hidden-field');
} else {
this.tagList = this.element.find('ul, ol').andSelf().last();
if ($.isFunction($.fn.addBack)) {
this.tagList = this.element.find('ul, ol').addBack().last();
} else {
this.tagList = this.element.find('ul, ol').andSelf().last();
}
}

this.tagInput = $('<input type="text" />').addClass('ui-widget-content');
Expand Down

0 comments on commit f668b90

Please sign in to comment.