From 5acdf875c404c16d13a15bd31edffd7a6f13cc12 Mon Sep 17 00:00:00 2001 From: Lone Iversen <108085781+loivsen@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:01:23 +0100 Subject: [PATCH] request root tree items --- .../templating/stylesheets/tree/stylesheet-tree.repository.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/tree/stylesheet-tree.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/tree/stylesheet-tree.repository.ts index 8f68a1e0dc..48729a8e06 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/tree/stylesheet-tree.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/tree/stylesheet-tree.repository.ts @@ -36,6 +36,7 @@ export class UmbStylesheetTreeRepository } async requestRootTreeItems() { + console.log('stylesheet root'); await this.#init; const { data, error } = await this.#treeDataSource.getRootItems(); @@ -49,6 +50,9 @@ export class UmbStylesheetTreeRepository async requestTreeItemsOf(path: string | null) { if (path === undefined) throw new Error('Cannot request tree item with missing path'); + if (path === null || path === '/' || path === '') { + return this.requestRootTreeItems(); + } await this.#init;