fix a typo in viewer.js which can cause cache miss

This commit is contained in:
loryeam 2022-10-03 08:09:07 +00:00 committed by Daniel Micay
parent 8d0caf65a2
commit fbd6c45c3f

View File

@ -73,7 +73,7 @@ function renderPage(pageNumber, zoom, prerender, prerenderTrigger=0) {
for (let i = 0; i < cache.length; i++) { for (let i = 0; i < cache.length; i++) {
const cached = cache[i]; const cached = cache[i];
if (cached.pageNumber === pageNumber && cached.zoomRatio === newZoomRatio && if (cached.pageNumber === pageNumber && cached.zoomRatio === newZoomRatio &&
cache.orientationDegrees === orientationDegrees) { cached.orientationDegrees === orientationDegrees) {
if (useRender) { if (useRender) {
cache.splice(i, 1); cache.splice(i, 1);
cache.push(cached); cache.push(cached);