Skip to content

Commit

Permalink
fix(sheet): error while creating an empty subunit (#1748)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gggpound committed Mar 30, 2024
1 parent e87d337 commit 662b4e0
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -40,7 +40,7 @@ type ComputeStatus = 'computing' | 'end' | 'error';
interface IComputeCache { status: ComputeStatus };

const beforeUpdateRuleResult = createInterceptorKey< { subUnitId: string; unitId: string; cfId: string }>('conditional-formatting-before-update-rule-result');
@OnLifecycle(LifecycleStages.Starting, ConditionalFormattingService)
@OnLifecycle(LifecycleStages.Ready, ConditionalFormattingService)
export class ConditionalFormattingService extends Disposable {
// <unitId,<subUnitId,<cfId,IComputeCache>>>
private _ruleCacheMap: Map<string, Map<string, Map<string, IComputeCache>>> = new Map();
Expand Down Expand Up @@ -162,8 +162,8 @@ export class ConditionalFormattingService extends Disposable {
})
)
);
const workbook = this._univerInstanceService.getCurrentUniverSheetInstance();
handleWorkbookAdd(workbook);
const workbookList = this._univerInstanceService.getAllUniverSheetsInstance();
workbookList.forEach((workbook) => handleWorkbookAdd(workbook));
}

private _initSheetChange() {
Expand Down

0 comments on commit 662b4e0

Please sign in to comment.