From df4faa0bc66b956b273ce8174e181b1646755cba Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Sat, 16 Dec 2023 21:23:48 +0100 Subject: [PATCH] only add dash if there is a parent path --- .../scripts/tree/folder/script-folder.server.data-source.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/tree/folder/script-folder.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/tree/folder/script-folder.server.data-source.ts index c5819f140e..83759f1752 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/tree/folder/script-folder.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/tree/folder/script-folder.server.data-source.ts @@ -81,7 +81,7 @@ export class UmbScriptFolderServerDataSource implements UmbFolderDataSource { if (!error) { /* TODO: investigate why we don't get the location header as part of data, so we don't have to construct the path ourselves */ - const newPath = `${parentPath}/${args.name}`; + const newPath = parentPath ? `${parentPath}/${args.name}` : args.name; return this.read(newPath); }