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; } }