Skip to content

Commit

Permalink
fix issue #238
Browse files Browse the repository at this point in the history
  • Loading branch information
ts-thomas committed Oct 3, 2022
1 parent 2e7eeeb commit 755f1ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Index.prototype.add = function(id, content, _append, _skip_update){

case "full":

if(term_length > 3){
if(term_length > 2){

for(let x = 0; x < term_length; x++){

Expand All @@ -183,13 +183,13 @@ Index.prototype.add = function(id, content, _append, _skip_update){
break;
}

// fallthrough to next case when term length < 4
// fallthrough to next case when term length < 3

case "reverse":

// skip last round (this token exist already in "forward")

if(term_length > 2){
if(term_length > 1){

for(let x = term_length - 1; x > 0; x--){

Expand Down

0 comments on commit 755f1ff

Please sign in to comment.