Second brain for knowledge workers that retains everything you read online and helps you to back up your communication with your source as easily as you might share an anecdote over a coffee.
To fix a regression introduced in #838 (the 2 loop optimisations were actually behavioural changes).
Although suboptimal, the older code did not insert empty arrays into various Map-s passed around in the TFJS algo. The newer code did, and because takeNBestScoring() used a convenient but happy-to-fail-silently Array.slice() it resulted in every node that's vaguely similar to the search phrase to be reported as a match.
To fix a regression introduced in #838 (the 2 loop optimisations were actually behavioural changes).
Although suboptimal, the older code did not insert empty arrays into various
Map
-s passed around in theTFJS
algo. The newer code did, and becausetakeNBestScoring()
used a convenient but happy-to-fail-silentlyArray.slice()
it resulted in every node that's vaguely similar to the search phrase to be reported as a match.This PR re-introduces the old behaviour.