Skip to content

Commit

Permalink
Fix remove dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Oct 29, 2023
1 parent aca074a commit c2960bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/dialogs/hacs-form-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "../../../homeassistant-frontend/src/components/ha-settings-row";
import type { HomeAssistant } from "../../../homeassistant-frontend/src/types";
import { HacsDispatchEvent } from "../../data/common";
import { websocketSubscription } from "../../data/websocket";
import type { HacsFormDialogParams } from "./show-hacs-form-dialog";
import type { HacsFormDialogParams } from "./show-hacs-dialog";

@customElement("hacs-form-dialog")
class HacsFromDialog extends LitElement {
Expand Down Expand Up @@ -108,13 +108,13 @@ class HacsFromDialog extends LitElement {
}

public async _saveClicked(): Promise<void> {
if (!this._dialogParams?.saveAction || !this._dialogParams!.data) {
if (!this._dialogParams?.saveAction) {
return;
}
this._errors = {};
this._waiting = true;
try {
await this._dialogParams.saveAction(this._dialogParams!.data);
await this._dialogParams.saveAction(this._dialogParams.data);
} catch (err: any) {
this._errors = { base: err?.message || "Unkown error, check Home Assistant logs" };
}
Expand Down

0 comments on commit c2960bf

Please sign in to comment.