1
0
mirror of synced 2024-11-25 06:16:08 +03:00

Fix broken tags, #3695

The local variable defined will overwrite the tags function, since the var will get hoisted to the functional scope
This commit is contained in:
Tom Zellman 2015-08-25 21:33:04 -04:00
parent a2e2257840
commit 3be19d8e62

View File

@ -1023,14 +1023,14 @@ the specific language governing permissions and limitations under the Apache Lic
// data-select2-tags -> data-tags
if (opts.element.data('tags') != null) {
var tags = opts.element.data('tags');
var elemTags = opts.element.data('tags');
// data-tags should actually be a boolean
if (!$.isArray(tags)) {
tags = [];
if (!$.isArray(elemTags)) {
elemTags = [];
}
opts.element.data('select2Tags', tags);
opts.element.data('select2Tags', elemTags);
}
// sortResults -> sorter