Skip to content

Commit cf06e9a

Browse files
author
Pierre Grimaud
committedMay 25, 2015
Small fix for IE<=7.
1 parent cf58a8e commit cf06e9a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed
 

‎bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lz-string",
3-
"version": "1.4.3",
3+
"version": "1.4.4",
44
"main": "libs/lz-string.min.js",
55
"ignore": [
66
"bin/",

‎libs/lz-string.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// For more information, the home page:
77
// http://pieroxy.net/blog/pages/lz-string/testing.html
88
//
9-
// LZ-based compression algorithm, version 1.4.3
9+
// LZ-based compression algorithm, version 1.4.4
1010
var LZString = (function() {
1111

1212
// private property
@@ -19,7 +19,7 @@ function getBaseValue(alphabet, character) {
1919
if (!baseReverseDic[alphabet]) {
2020
baseReverseDic[alphabet] = {};
2121
for (var i=0 ; i<alphabet.length ; i++) {
22-
baseReverseDic[alphabet][alphabet[i]] = i;
22+
baseReverseDic[alphabet][alphabet.charAt(i)] = i;
2323
}
2424
}
2525
return baseReverseDic[alphabet][character];
@@ -123,7 +123,7 @@ var LZString = {
123123
ii;
124124

125125
for (ii = 0; ii < uncompressed.length; ii += 1) {
126-
context_c = uncompressed[ii];
126+
context_c = uncompressed.charAt(ii);
127127
if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {
128128
context_dictionary[context_c] = context_dictSize++;
129129
context_dictionaryToCreate[context_c] = true;
@@ -470,15 +470,15 @@ var LZString = {
470470
entry = dictionary[c];
471471
} else {
472472
if (c === dictSize) {
473-
entry = w + w[0];
473+
entry = w + w.charAt(0);
474474
} else {
475475
return null;
476476
}
477477
}
478478
result.push(entry);
479479

480480
// Add w+entry[0] to the dictionary.
481-
dictionary[dictSize++] = w + entry[0];
481+
dictionary[dictSize++] = w + entry.charAt(0);
482482
enlargeIn--;
483483

484484
w = entry;

‎libs/lz-string.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lz-string",
3-
"version": "1.4.3",
3+
"version": "1.4.4",
44
"license": "WTFPL",
55
"filename": "lz-string.js",
66
"description": "LZ-based compression algorithm",

0 commit comments

Comments
 (0)
Please sign in to comment.