fix(core): update

This commit is contained in:
2021-10-03 17:12:02 +02:00
parent cbc72cd55b
commit cb5a24320c
10 changed files with 25536 additions and 429 deletions

View File

@@ -26,7 +26,7 @@ export class Smartfuzzy {
* returns the closest match for a given string
* @param stringArg
*/
getChangeScoreForString(stringArg): TDictionaryMap {
getChangeScoreForString(stringArg: string): TDictionaryMap {
const dictionaryMap: TDictionaryMap = {};
for (const wordArg of this.dictionary) {
dictionaryMap[wordArg] = plugins.leven(stringArg, wordArg);
@@ -54,7 +54,7 @@ export class Smartfuzzy {
const fuzzyResult = fuse.search(stringArg);
let closestMatch: string = null;
if(fuzzyResult.length > 0) {
closestMatch = fuzzyResult[0].name;
closestMatch = fuzzyResult[0].item.name
}
return closestMatch;
}