Skip to content

Commit

Permalink
fix: fix current render handling in desktop controller (#2067)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzhudev authored Apr 25, 2024
1 parent e440e04 commit ddbeb02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ui/src/controllers/ui/ui-desktop.controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export class DesktopUIController extends Disposable implements IDesktopUIControl
this._renderManagerService.currentRender$.subscribe((renderId) => {
if (renderId) {
const render = this._renderManagerService.getRenderById(renderId)!;
if (!render.unitId) return;

const unitType = this._instanceService.getUnitType(render.unitId);
if (unitType !== UniverInstanceType.SHEET) return;

Expand Down

0 comments on commit ddbeb02

Please sign in to comment.