Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FadhlanR committed Feb 19, 2025
1 parent e9cad62 commit 6ad3994
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,19 @@ class PlaygroundPanelContent extends Component<PlaygroundContentSignature> {
});

private get canEdit() {
return this.format !== 'edit' && this.realm.canWrite(this.card.id);
return (
this.format !== 'edit' &&
this.card?.id &&
this.realm.canWrite(this.card.id)
);
}

@action
private setEditFormat() {
this.format = 'edit';
if (!this.card?.id) {
return;
}
this.persistSelections(this.card.id, 'edit');
}
}

Expand Down

0 comments on commit 6ad3994

Please sign in to comment.