aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DocumentView.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 345ca479f..9c8c05176 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -576,7 +576,14 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
}
@undoBatch
- deleteClicked = (): void => { SelectionManager.DeselectAll(); this.props.removeDocument?.(this.props.Document); }
+ deleteClicked = (): void => {
+ if (Doc.UserDoc().activeWorkspace === this.props.Document) {
+ alert("Can't delete the active workspace");
+ } else {
+ SelectionManager.DeselectAll();
+ this.props.removeDocument?.(this.props.Document);
+ }
+ }
@undoBatch