Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
jshint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobius1 committed Jun 16, 2017
1 parent 155a41c commit 3b02deb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/selectr.js
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@
* @param {HTMLElement} item
*/
var addTag = function(item) {
var that = this, replace;
var that = this, r;

var docFrag = document.createDocumentFragment();
var option = this.options[item.idx];
Expand Down Expand Up @@ -1203,9 +1203,9 @@
var tags = this.tags.slice();

// Deal with values that contain numbers
replace = function(val, arr) {
r = function(val, arr) {
val.replace(/(\d+)|(\D+)/g, function(that, $1, $2) { arr.push([$1 || Infinity, $2 || ""]); });
}
};

tags.sort(function(a, b) {
var x = [], y = [], ac, bc;
Expand All @@ -1217,8 +1217,8 @@
bc = b.textContent;
}

replace(ac, x);
replace(bc, y);
r(ac, x);
r(bc, y);

while(x.length && y.length) {
var ax = x.shift();
Expand Down

0 comments on commit 3b02deb

Please sign in to comment.