From a7fe3cb09c9ff3374a63a78a420f5771722ff06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Sun, 3 Mar 2024 23:10:21 +0100 Subject: [PATCH] hasActions optimization --- .../entity-actions-bundle/entity-actions-bundle.element.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index de8693f7dc..b856c443da 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -44,9 +44,9 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { this.observe( umbExtensionsRegistry .byType('entityAction') - .pipe(map((actions) => actions.filter((action) => action.forEntityTypes.includes(this.entityType!)))), - (actions) => { - this._hasActions = actions.length > 0; + .pipe(map((actions) => actions.some((action) => action.forEntityTypes.includes(this.entityType!)))), + (hasActions) => { + this._hasActions = hasActions; }, 'umbEntityActionsObserver', );