From 1bd0a1f86d6b540b241c1df805bcf5b34efb6905 Mon Sep 17 00:00:00 2001 From: Matthew Care Date: Sat, 3 Sep 2022 22:58:03 +0200 Subject: [PATCH] Set the first app to active if no active apps Add support for a block list item which only contains settings --- .../infiniteeditors/blockeditor/blockeditor.controller.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js index d3a87791f9..64e3f67fea 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js @@ -35,6 +35,11 @@ angular.module("umbraco") } } + var activeApp = apps.filter(x => x.active); + if (activeApp.length === 0 && apps.length > 0) { + apps[0].active = true; + } + vm.tabs = apps; }