From b2bc9dae1c8bccff9efca814507bf0000c5ccb67 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Tue, 29 Nov 2022 14:09:23 +0000 Subject: [PATCH] Update search.scanCount correctly Former-commit-id: c60309cbd9d027a464433885bc8e1c2ea9cbf6d8 --- www/js/lib/zimArchive.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/js/lib/zimArchive.js b/www/js/lib/zimArchive.js index 4cfb2b46..62ee1015 100644 --- a/www/js/lib/zimArchive.js +++ b/www/js/lib/zimArchive.js @@ -475,6 +475,7 @@ define(['zimfile', 'zimDirEntry', 'transformZimit', 'util', 'uiUtil', 'utf8'], // Collect all the paths for full text search, pruning as we go var path; for (var j = 0; j < results.entries.length; j++) { + search.scanCount++; path = results.entries[j].path; // Full-text search result paths are missing the namespace in Type 1 ZIMs, so we add it back path = cns === 'C' ? cns + '/' + path : path;