From 698bb099d9496f92e39f474ad023734284c58279 Mon Sep 17 00:00:00 2001 From: cesare Date: Mon, 12 Feb 2024 14:14:40 +0100 Subject: [PATCH] corretto bug in ricerca testuale --- js/cesareBrowse.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 49ba660..1ca5284 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -1420,17 +1420,17 @@ function resetFrasi(){ noContext=false inf = contesto[0].reduce((a, e, i) => { if (e === 1) - a.push(i); + a.push(i+1); return a; }, []); pur = contesto[1].reduce((a, e, i) => { if (e === 1) - a.push(i); + a.push(i+1); return a; }, []); par = contesto[2].reduce((a, e, i) => { if (e === 1) - a.push(i); + a.push(i+1); return a; }, []); } @@ -1478,7 +1478,8 @@ function resetFrasi(){ } if (fnd){ //console.log('ipfound: '+forme[ip].split('_')[2]+' - '+forme[(ip+testo.length-1)].split('_')[2]) - if(cont.length && !(parseInt(forme[ip].split('_')[1]) in cont)){ + if(cont.length && !cont.includes(parseInt(forme[ip].split('_')[1]))){ + continue } resultsInCantica.push(cantica)