Skip to content

Commit

Permalink
Small fix for IE<=7.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Grimaud committed May 25, 2015
1 parent cf58a8e commit cf06e9a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lz-string",
"version": "1.4.3",
"version": "1.4.4",
"main": "libs/lz-string.min.js",
"ignore": [
"bin/",
Expand Down
10 changes: 5 additions & 5 deletions libs/lz-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// For more information, the home page:
// http://pieroxy.net/blog/pages/lz-string/testing.html
//
// LZ-based compression algorithm, version 1.4.3
// LZ-based compression algorithm, version 1.4.4
var LZString = (function() {

// private property
Expand All @@ -19,7 +19,7 @@ function getBaseValue(alphabet, character) {
if (!baseReverseDic[alphabet]) {
baseReverseDic[alphabet] = {};
for (var i=0 ; i<alphabet.length ; i++) {
baseReverseDic[alphabet][alphabet[i]] = i;
baseReverseDic[alphabet][alphabet.charAt(i)] = i;
}
}
return baseReverseDic[alphabet][character];
Expand Down Expand Up @@ -123,7 +123,7 @@ var LZString = {
ii;

for (ii = 0; ii < uncompressed.length; ii += 1) {
context_c = uncompressed[ii];
context_c = uncompressed.charAt(ii);
if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {
context_dictionary[context_c] = context_dictSize++;
context_dictionaryToCreate[context_c] = true;
Expand Down Expand Up @@ -470,15 +470,15 @@ var LZString = {
entry = dictionary[c];
} else {
if (c === dictSize) {
entry = w + w[0];
entry = w + w.charAt(0);
} else {
return null;
}
}
result.push(entry);

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

w = entry;
Expand Down
2 changes: 1 addition & 1 deletion libs/lz-string.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lz-string",
"version": "1.4.3",
"version": "1.4.4",
"license": "WTFPL",
"filename": "lz-string.js",
"description": "LZ-based compression algorithm",
Expand Down

0 comments on commit cf06e9a

Please sign in to comment.