Bugfix: Allow breadcrumb for variant root items (#2482)

unique can be null so only check for undefined
This commit is contained in:
Mads Rasmussen
2024-10-24 12:25:40 +02:00
committed by GitHub
parent 9bc5ab33d2
commit c5fd1885cf

View File

@@ -45,7 +45,7 @@ export abstract class UmbMenuVariantTreeStructureWorkspaceContextBase extends Um
let structureItems: Array<UmbVariantStructureItemModel> = [];
const unique = (await this.observe(uniqueObservable, () => {})?.asPromise()) as string;
if (!unique) throw new Error('Unique is not available');
if (unique === undefined) throw new Error('Unique is not available');
const entityType = (await this.observe(entityTypeObservable, () => {})?.asPromise()) as string;
if (!entityType) throw new Error('Entity type is not available');