Skip to content

Commit

Permalink
fix(conditional-formatting): custom formula rendering error
Browse files Browse the repository at this point in the history
  • Loading branch information
Gggpound committed Apr 29, 2024
1 parent 21b7a14 commit 7e2d6f4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import type { ICellData, Nullable, ObjectMatrix } from '@univerjs/core';
import { Disposable, ICommandService, RefAlias, toDisposable, Tools } from '@univerjs/core';
import { BooleanNumber, CellValueType, Disposable, ICommandService, RefAlias, toDisposable, Tools } from '@univerjs/core';
import { Inject, Injector } from '@wendellhu/redi';
import type { IRemoveOtherFormulaMutationParams, ISetFormulaCalculationResultMutation, ISetOtherFormulaMutationParams } from '@univerjs/engine-formula';
import { IActiveDirtyManagerService, RemoveOtherFormulaMutation,
Expand Down Expand Up @@ -43,6 +43,9 @@ export enum FormulaResultStatus {

const getResultFromFormula = (formulaResult: Nullable<ICellData>[][]) => {
const v = formulaResult && formulaResult[0] && formulaResult[0][0];
if (v?.t === CellValueType.BOOLEAN) {
return v.v === BooleanNumber.TRUE;
}
return v ? v.v : false;
};
// TODO: @Gggpound
Expand Down

0 comments on commit 7e2d6f4

Please sign in to comment.