wingbot 3.52.1 → 3.52.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/AiMatching.js +5 -3
package/package.json
CHANGED
package/src/AiMatching.js
CHANGED
|
@@ -674,19 +674,21 @@ class AiMatching {
|
|
|
674
674
|
._entityIsMatching(wanted.op, wanted.compare, undefined, requestState);
|
|
675
675
|
}
|
|
676
676
|
|
|
677
|
-
if (!matching && !wanted.optional) {
|
|
677
|
+
if (!matching && (!wanted.optional || requestEntity)) {
|
|
678
678
|
return {
|
|
679
679
|
score: 0, handicap: 0, matched: [], minScore, fromState
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
-
if (!matching) { // optional
|
|
683
|
+
if (!matching) { // && optional && !requestEntity
|
|
684
684
|
handicap += this.redundantEntityHandicap;
|
|
685
685
|
continue;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
if (wanted.optional) {
|
|
689
|
-
handicap +=
|
|
689
|
+
handicap += wanted.op
|
|
690
|
+
? this.optionalHandicap
|
|
691
|
+
: (this.optionalHandicap * 2);
|
|
690
692
|
}
|
|
691
693
|
|
|
692
694
|
if (wanted.op === COMPARE.NOT_EQUAL) {
|