Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
weird94 committed Jan 2, 2025
1 parent 2c8e02d commit 68376f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sheets/src/facade/f-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class FUniverSheetsMixin extends FUniver implements IFUniverSheetsMixin {
case InsertSheetCommand.id: {
const params = (commandInfo.params) as IInsertSheetCommandParams;
const { unitId, index, sheet } = params || {};
const workbook = unitId ? this.getUniverSheet(unitId) : this.getActiveWorkbook();
const workbook = unitId ? this.getUniverSheet(unitId) : this.getActiveWorkbook?.();
if (!workbook) {
return;
}
Expand Down Expand Up @@ -104,7 +104,7 @@ export class FUniverSheetsMixin extends FUniver implements IFUniverSheetsMixin {
case InsertSheetCommand.id: {
const params = commandInfo.params as IInsertSheetCommandParams;
const { unitId } = params || {};
const workbook = unitId ? this.getUniverSheet(unitId) : this.getActiveWorkbook();
const workbook = unitId ? this.getUniverSheet(unitId) : this.getActiveWorkbook?.();
if (!workbook) {
return;
}
Expand Down

0 comments on commit 68376f9

Please sign in to comment.