only add dash if there is a parent path

This commit is contained in:
Mads Rasmussen
2023-12-16 21:23:48 +01:00
parent e3294c42c2
commit df4faa0bc6

View File

@@ -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);
}