Skip to content

Commit

Permalink
fix(db): fix replace values func with new manticore
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Nov 28, 2022
1 parent 2b3676d commit 7279ade
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/background/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,19 @@ const expand = (sphinx) => {
{
for(const k in sphinxIndex)
{
// sphinx index can output as lower case like feedIndex -> feedindex, so don't dublicate index
// in this case
let k_index = k;
const lowerK = k.toLowerCase();
if (typeof values[lowerK] != 'undefined')
k_index = lowerK;
if(typeof sphinxIndex[k] === 'string')
{
values[k] = values[sphinxIndex[k]]
values[k_index] = values[sphinxIndex[k]]
}
else if (typeof sphinxIndex[k] === 'function')
{
values[k] = sphinxIndex[k](values)
values[k_index] = sphinxIndex[k](values)
}
}
}
Expand Down

0 comments on commit 7279ade

Please sign in to comment.