Fix typo that prevented sync from working properly

This commit is contained in:
Vjacheslav Trushkin 2018-10-16 10:38:09 +03:00
parent d3aad3883c
commit 3d51e732fa
3 changed files with 6 additions and 6 deletions

6
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "simple-svg-website-icons",
"version": "1.0.0-beta6",
"version": "1.0.0-beta7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -545,11 +545,11 @@
"resolved": "https://registry.npmjs.org/simple-svg-icons/-/simple-svg-icons-2.0.0.tgz",
"integrity": "sha512-Zf9eGWIV+V8tV3OLowJJ3xPDT2DyuA+AToYKJyUz3pLSaJie8ak/aq5WvU4d1IPzZQJOn0dwe3LGHs5ZDsAoZA==",
"requires": {
"simple-svg-icons-data": "git+https://github.com/simplesvg/icons.git#136aca86a02af52767f80191ec924185b5dc423c"
"simple-svg-icons-data": "git+https://github.com/simplesvg/icons.git#b4c059b3aefd5c54983d04e665a62bceb0446e1b"
}
},
"simple-svg-icons-data": {
"version": "git+https://github.com/simplesvg/icons.git#136aca86a02af52767f80191ec924185b5dc423c",
"version": "git+https://github.com/simplesvg/icons.git#b4c059b3aefd5c54983d04e665a62bceb0446e1b",
"from": "git+https://github.com/simplesvg/icons.git"
},
"statuses": {

View File

@ -1,6 +1,6 @@
{
"name": "simple-svg-website-icons",
"version": "1.0.0-beta6",
"version": "1.0.0-beta7",
"description": "Node.js version of icons.simplesvg.com",
"main": "app.js",
"scripts": {

View File

@ -134,7 +134,7 @@ class Collection {
let checkCache = typeof defaultPrefix === 'string';
// Check cache
if (checkCache && cache[defaultPrefix] !== void 0 && cache[defaultPrefix].length === file.length) {
if (checkCache && cache[defaultPrefix] !== void 0 && cache[defaultPrefix].length === data.length) {
// If JSON file has same length, assume its the same file. Do not bother with hashing
fulfill(cache[defaultPrefix].collection);
return;
@ -144,7 +144,7 @@ class Collection {
if (this.loaded) {
if (checkCache) {
cache[defaultPrefix] = {
length: file.length,
length: data.length,
collection: this
};
}