allow alias to be undefined

This commit is contained in:
Jacob Overgaard
2023-01-17 11:25:58 +01:00
parent 450ca9b638
commit f7fc73b2d4
3 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ export class UmbContextConsumerController<T = unknown>
implements UmbControllerInterface
{
public get unique() {
return this._contextAlias?.toString();
return this._contextAlias.toString();
}
constructor(

View File

@@ -6,7 +6,7 @@ export abstract class UmbController implements UmbControllerInterface {
private _alias?: string;
public get unique() {
return this._alias ?? UmbController.name;
return this._alias;
}
constructor(host: UmbControllerHostInterface, alias?: string) {

View File

@@ -1,5 +1,5 @@
export interface UmbControllerInterface {
get unique(): string;
get unique(): string | undefined;
hostConnected(): void;
hostDisconnected(): void;
destroy(): void;