diff --git a/package.json b/package.json index a55ffce66..85fdb71da 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "streamqueue": "^1.1.1", "systemjs": "^0.20.7", "systemjs-plugin-babel": "0.0.21", + "ttest": "^1.1.0", "typogr": "^0.6.6", "uglify-js": "^2.6.1", "vinyl-fs": "^2.4.4", diff --git a/src/core/parser.js b/src/core/parser.js index 29c433ee0..6e0b6d184 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -398,12 +398,13 @@ var Parser = (function ParserClosure() { } adler32 = ((b % 65521) << 16) | (a % 65521); - if (this.imageCache.adler32 === adler32) { + let cacheEntry = this.imageCache[adler32]; + if (cacheEntry !== undefined) { this.buf2 = Cmd.get('EI'); this.shift(); - this.imageCache[adler32].reset(); - return this.imageCache[adler32]; + cacheEntry.reset(); + return cacheEntry; } }