Merge pull request #8792 from Snuffleupagus/issue-8790

Fix caching of small inline images in `Parser.makeInlineImage` (issue 8790)
This commit is contained in:
Jonas Jenwald 2017-08-19 09:12:55 +02:00 committed by GitHub
commit 9b26bec1d7
2 changed files with 5 additions and 3 deletions

View File

@ -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",

View File

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