convert to server path

This commit is contained in:
Mads Rasmussen
2024-03-18 16:09:48 +01:00
parent 93a39ea394
commit 4d528da0d1

View File

@@ -53,11 +53,15 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => {
}
};
const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) =>
const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => {
const descendantPath = new UmbServerFilePathUniqueSerializer().toServerPath(args.descendantUnique);
if (!descendantPath) throw new Error('Descendant path is not available');
// eslint-disable-next-line local-rules/no-direct-api-import
StylesheetResource.getTreeStylesheetAncestors({
descendantPath: args.descendantUnique,
return StylesheetResource.getTreeStylesheetAncestors({
descendantPath,
});
};
const mapper = (item: FileSystemTreeItemPresentationModel): UmbStylesheetTreeItemModel => {
const serializer = new UmbServerFilePathUniqueSerializer();