Skip to content

Commit

Permalink
Use jQuery.text() instead of jQuery.append() when displaying selected…
Browse files Browse the repository at this point in the history
… option in selectWoo
  • Loading branch information
rodrigoprimo authored and mikejolley committed Apr 16, 2019
1 parent 4e4e084 commit 004e839
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/selectWoo/selectWoo.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ S2.define('select2/selection/single',[
var $rendered = this.$selection.find('.select2-selection__rendered');
var formatted = this.display(selection, $rendered);

$rendered.empty().append(formatted);
$rendered.empty().text(formatted);
$rendered.prop('title', selection.title || selection.text);
};

Expand Down
2 changes: 1 addition & 1 deletion assets/js/selectWoo/selectWoo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ S2.define('select2/selection/single',[
var $rendered = this.$selection.find('.select2-selection__rendered');
var formatted = this.display(selection, $rendered);

$rendered.empty().append(formatted);
$rendered.empty().text(formatted);
$rendered.prop('title', selection.title || selection.text);
};

Expand Down

0 comments on commit 004e839

Please sign in to comment.