fix(core): update
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user