diff --git a/src/Umbraco.Web.UI.Client/src/libs/class-api/class.mixin.ts b/src/Umbraco.Web.UI.Client/src/libs/class-api/class.mixin.ts index 3cb7f91fc0c7..0b1c893bcdb7 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/class-api/class.mixin.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/class-api/class.mixin.ts @@ -59,7 +59,8 @@ export const UmbClassMixin = >(superClas // Fallback to use a hash of the provided method, but only if the alias is undefined and there is a callback. if (controllerAlias === undefined && callback) { controllerAlias = simpleHashCode(callback.toString()); - } else { + } else if (controllerAlias === null) { + // if value is null, then reset it to undefined. Null is used to explicitly tell that we do not want a controller alias. [NL] controllerAlias = undefined; } diff --git a/src/Umbraco.Web.UI.Client/src/libs/element-api/element.mixin.ts b/src/Umbraco.Web.UI.Client/src/libs/element-api/element.mixin.ts index dfb35472e9d7..9b46710c58b4 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/element-api/element.mixin.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/element-api/element.mixin.ts @@ -35,7 +35,8 @@ export const UmbElementMixin = (superClass: T) // Fallback to use a hash of the provided method, but only if the alias is undefined and there is a callback. if (controllerAlias === undefined && callback) { controllerAlias = simpleHashCode(callback.toString()); - } else { + } else if (controllerAlias === null) { + // if value is null, then reset it to undefined. Null is used to explicitly tell that we do not want a controller alias. [NL] controllerAlias = undefined; }