Skip to content

Commit

Permalink
DASH-24 optimise condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
pixl8-brayden committed Jul 4, 2023
1 parent 95a1774 commit 406bc13
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions handlers/admin/AdminDashboards.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,7 @@ component extends="preside.system.base.AdminHandler" {
var widget = Duplicate( unsortedOrTranslated[ id ] );

if ( widget.siteTemplates == "*" || ListFindNoCase( widget.siteTemplates, activeSiteTemplate ) ) {
if ( !widgetService.isEnabled( widget.id ) ) {
continue;
}

if ( ! widgetService.isUserDashboardWidget( widget.id ) ) {
if ( !widgetService.isEnabled( widget.id ) || !widgetService.isUserDashboardWidget( widget.id ) ) {
continue;
}

Expand Down

0 comments on commit 406bc13

Please sign in to comment.