From 1411bb960faed3f3f93ae783a6db3cc645ceabe4 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:28:04 +0200 Subject: [PATCH] chore: simplify typings --- .../src/packages/core/store/store-object-base.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); }