Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AG committed Mar 6, 2024
1 parent 4fd5551 commit 2a578d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script-fingerprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const clear_suggestion = () => {
suggested_text_on_deck = [];
suggestion.classList.remove("two_word");
suggestion.classList.remove("three_word");
set_state("no_suggestion")
}

const get_anchor = () => {
Expand Down Expand Up @@ -279,7 +280,7 @@ const filter_on_suggested_text_on_deck = (e) => {
if (inside_suggestion_match.length) {
last_word = inside_suggestion_match[0] + e.key;
}
console.log(last_word)
if (!suggested_text_on_deck.length) return
// Find the index of the first item that starts with the last word
const matchIndex = suggested_text_on_deck.findIndex(item => item.startsWith(last_word));
console.log(matchIndex, suggested_text_on_deck)
Expand Down

0 comments on commit 2a578d3

Please sign in to comment.