diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/store/store-object-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/store/store-object-base.ts index 439397f4f6..5d3004489b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/store/store-object-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/store/store-object-base.ts @@ -8,11 +8,11 @@ import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; * The base class for a store that holds an object. */ export class UmbStoreObjectBase extends UmbContextBase implements UmbApi { - protected _data: UmbObjectState; + protected _data; constructor(host: UmbControllerHost, storeAlias: string, initialData?: T) { super(host, storeAlias); - this._data = new UmbObjectState(initialData); + this._data = new UmbObjectState(initialData ?? null); } /** @@ -29,7 +29,7 @@ export class UmbStoreObjectBase extends UmbContextBase implements UmbA * Returns the current state of the store * @memberof UmbStoreObjectBase */ - getState(): T | undefined { + getState() { return this._data.getValue(); }