From 37574f3d9fbc8b7f0fca55e3bb3bb4136df41568 Mon Sep 17 00:00:00 2001 From: Lone Iversen <108085781+loivsen@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:05:25 +0200 Subject: [PATCH] if notation --- .../dashboard-performance-profiling.element.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.ts b/src/Umbraco.Web.UI.Client/src/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.ts index 16f5fd2c9d..df16600721 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.ts @@ -38,7 +38,11 @@ export class UmbDashboardPerformanceProfilingElement extends UmbLitElement { ProfilingResource.putProfilingStatus({ requestBody: { enabled: !this._profilingStatus } }), ); - error ? this.#setToggle(this._profilingStatus) : this.#setToggle(!this._profilingStatus); + if (error) { + this.#setToggle(this._profilingStatus); + } else { + this.#setToggle(!this._profilingStatus); + } } private renderProfilingStatus() {