Fix retreiving topic value when using MQTT publish (#14554)

fixes undefined
This commit is contained in:
Jan Bouwhuis 2022-12-05 14:33:50 +01:00 committed by GitHub
parent 4fcfcbeefb
commit ef3caf91f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ class HaPanelDevMqtt extends LitElement {
}
private _handleTopic(ev: CustomEvent) {
this.topic = ev.detail.value;
this.topic = (ev.target! as any).value;
if (localStorage && this.inited) {
localStorage["panel-dev-mqtt-topic"] = this.topic;
}