Skip to content

Commit 1712e35

Browse files
committed
Upped liquidmetal dependency to 1.2.1 to fix IE issues
Fixes #12
1 parent b7a5b65 commit 1712e35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

liquidmetal.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* LiquidMetal, version: 1.2 (2012-03-28)
2+
* LiquidMetal, version: 1.2.1 (2012-04-21)
33
*
44
* A mimetic poly-alloy of Quicksilver's scoring algorithm, essentially
55
* LiquidMetal.
@@ -18,7 +18,7 @@ var LiquidMetal = (function() {
1818
var SCORE_TRAILING = 0.8;
1919
var SCORE_TRAILING_BUT_STARTED = 0.9;
2020
var SCORE_BUFFER = 0.85;
21-
var WORD_SEPARATORS = [" ", "\t", "_", "-"];
21+
var WORD_SEPARATORS = " \t_-";
2222

2323
return {
2424
lastScore: null,
@@ -36,7 +36,7 @@ var LiquidMetal = (function() {
3636
this._scoreAll(string, search, abbrev, -1, 0, [], allScores);
3737

3838
// complete miss
39-
if (!allScores.length) return 0;
39+
if (allScores.length == 0) return 0;
4040

4141
// sum per-character scores into overall scores,
4242
// selecting the maximum score
@@ -65,7 +65,7 @@ var LiquidMetal = (function() {
6565
// save completed match scores at end of search
6666
if (abbrIndex == abbrev.length) {
6767
// add trailing score for the remainder of the match
68-
var started = (search[0] == abbrev[0]);
68+
var started = (search.charAt(0) == abbrev.charAt(0));
6969
var trailScore = started ? SCORE_TRAILING_BUT_STARTED : SCORE_TRAILING;
7070
fillArray(scores, trailScore, scores.length, string.length);
7171
// save score clone (since reference is persisted in scores)
@@ -74,7 +74,7 @@ var LiquidMetal = (function() {
7474
}
7575

7676
// consume current char to match
77-
var c = abbrev[abbrIndex];
77+
var c = abbrev.charAt(abbrIndex);
7878
abbrIndex++;
7979

8080
// cancel match if a character is missing

0 commit comments

Comments
 (0)