Skip to content

Commit

Permalink
Make code more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
georgegevoian committed Dec 3, 2024
1 parent bda84fb commit c858b88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/client/ui/CustomWidgetGallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ class CustomWidgetGallery extends Disposable {
}
});

this._saveDisabled = Computed.create(
this,
(use) => !use(this._selectedWidgetId)
);
this._saveDisabled = Computed.create(this, (use) => {
const selectedWidgetId = use(this._selectedWidgetId);
return selectedWidgetId === null;
});

this._initializeWidgets().catch(reportError);

Expand Down

0 comments on commit c858b88

Please sign in to comment.