Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
weird94 committed Nov 18, 2024
1 parent 5d39bd9 commit 88bc0ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/sheets-ui/src/facade/f-range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,11 @@ class FRangeSheetsUIMixin extends FRange implements IFRangeSheetsUIMixin {
const markSelectionService = this._injector.get(IMarkSelectionService);
const id = markSelectionService.addShape({ range: this._range, style, primary });

if (!id) {
throw new Error('Failed to highlight current range');
}
return toDisposable(() => {
id && markSelectionService.removeShape(id);
markSelectionService.removeShape(id);
});
}
}
Expand Down

0 comments on commit 88bc0ec

Please sign in to comment.