substr() takes a length, not an offset. Fixes #275

This commit is contained in:
Thomas Wilburn 2014-07-16 23:23:39 -07:00
parent 70bb6a006a
commit 9a0e97583d

View file

@ -60,7 +60,7 @@ define(function() {
} else { } else {
var chunks = []; var chunks = [];
for (var i = 0; i < data.length; i += 3000) { for (var i = 0; i < data.length; i += 3000) {
chunks.push(data.substr(i, i + 3000)); chunks.push(data.substr(i, 3000));
} }
var hash = {}; var hash = {};
hash[key] = chunks.length; hash[key] = chunks.length;