Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(formula): skip processing tree when there is no formula (#4586)
Dushusir303c0b2c6b6b
diff --git a/packages/engine-formula/src/engine/dependency/formula-dependency.ts b/packages/engine-formula/src/engine/dependency/formula-dependency.tsindex 583d0053e0..4c2cd3487d 100644--- a/packages/engine-formula/src/engine/dependency/formula-dependency.ts+++ b/packages/engine-formula/src/engine/dependency/formula-dependency.ts@@ -345,6 +345,11 @@ export class FormulaDependencyGenerator extends Disposable {for (let i = 0, len = treeList.length; i < len; i++) {const tree = treeList[i];+ // After entering the pivot table, no calculation is required if there is no formula+ if (!tree.formula) {+ continue;+ }+const node = this._getTreeNode(tree);tree.isDirty = this._includeTree(tree, node);