mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
[se] Refactor CountIfCache._calculate
This commit is contained in:
committed by
Aleksandr Nagaev
parent
ec1b569abe
commit
ff59d786d3
@ -12604,10 +12604,9 @@ function (window, undefined) {
|
||||
type = cElementType.number;
|
||||
}
|
||||
}
|
||||
let matchingFunction = getMatchingFunction(type, matchingInfo.op, isWildcard);
|
||||
const matchingFunction = getMatchingFunction(type, matchingInfo.op, isWildcard);
|
||||
_count = this.typedCache.forEachInTyped(range, type, matchingFunction, searchValue);
|
||||
if (type === cElementType.number) {
|
||||
matchingFunction = getMatchingFunction(type, matchingInfo.op, isWildcard);
|
||||
_count += this.typedCache.forEachInTyped(range, cElementType.string, matchingFunction, searchValue, true);
|
||||
}
|
||||
} else if (matchingInfo.op === '<>') {
|
||||
|
||||
@ -9921,7 +9921,7 @@ $(function () {
|
||||
assert.ok(oParser.parse());
|
||||
assert.strictEqual(oParser.calculate().getValue(), 4);
|
||||
|
||||
// testArrayFormula2(assert, "COUNTIF", 2, 2)
|
||||
testArrayFormula2(assert, "COUNTIF", 2, 2);
|
||||
});
|
||||
|
||||
QUnit.test("Test: \"COUNTBLANK\"", function (assert) {
|
||||
|
||||
Reference in New Issue
Block a user