diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/store/file-system-tree.store.ts b/src/Umbraco.Web.UI.Client/src/packages/core/store/file-system-tree.store.ts index c78093184d..609510bb92 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/store/file-system-tree.store.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/store/file-system-tree.store.ts @@ -31,9 +31,11 @@ export class UmbFileSystemTreeStore * @memberof UmbFileSystemTreeStore */ childrenOf(parentPath: string | null) { - return this._data.asObservablePart((items) => - items.filter((item) => item.path?.startsWith(parentPath + '/') || parentPath === null) - ); + if (parentPath === null) { + return this.rootItems; + } + + return this._data.asObservablePart((items) => items.filter((item) => item.path?.startsWith(parentPath + '/'))); } /**