diff --git a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts index 547d4d78df..ae130a4a24 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts @@ -83,8 +83,7 @@ export class UmbAppElement extends UmbLitElement { */ OpenAPI.BASE = this.serverUrl; - this.#serverConnection = new UmbServerConnection(this.serverUrl); - await this.#serverConnection.connect(); + this.#serverConnection = await new UmbServerConnection(this.serverUrl).connect(); this.#authContext = new UmbAuthContext(this, this.serverUrl, this.backofficePath, this.bypassAuth); new UmbAppContext(this, { backofficePath: this.backofficePath, serverUrl: this.serverUrl }); diff --git a/src/Umbraco.Web.UI.Client/src/apps/app/server-connection.ts b/src/Umbraco.Web.UI.Client/src/apps/app/server-connection.ts index 48fb1d9bf4..5655be20f2 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/app/server-connection.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/app/server-connection.ts @@ -19,6 +19,7 @@ export class UmbServerConnection { */ async connect() { await this.#setStatus(); + return this; } /**