FuzzyMap set strictly

This commit is contained in:
2021-12-15 17:25:43 -07:00
parent a49662863b
commit dcd4ad7833

View File

@@ -61,9 +61,7 @@ abstract FuzzyMap<T>(StringMap<T>) from StringMap<T> to StringMap<T> {
} }
@:arrayAccess @:arrayAccess
public inline function set(fuzzySearchKey:String, v:T):T { public inline function set(key:String, v:T):T {
var key = bestMatch(fuzzySearchKey, false);
if (key == null) key = fuzzySearchKey;
this.set(key, v); this.set(key, v);
return v; return v;
} }