mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
Make error optional in connection lost service check (#8937)
This commit is contained in:
parent
e3c38b93f4
commit
f21ed24a49
@ -282,7 +282,7 @@ class HaPanelDevService extends LitElement {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
const [domain, service] = this._serviceData.service.split(".", 2);
|
const [domain, service] = this._serviceData.service.split(".", 2);
|
||||||
if (
|
if (
|
||||||
err.error.code === ERR_CONNECTION_LOST &&
|
err.error?.code === ERR_CONNECTION_LOST &&
|
||||||
serviceCallWillDisconnect(domain, service)
|
serviceCallWillDisconnect(domain, service)
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
|
@ -81,7 +81,7 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
|
|||||||
)) as Promise<ServiceCallResponse>;
|
)) as Promise<ServiceCallResponse>;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (
|
if (
|
||||||
err.error.code === ERR_CONNECTION_LOST &&
|
err.error?.code === ERR_CONNECTION_LOST &&
|
||||||
serviceCallWillDisconnect(domain, service)
|
serviceCallWillDisconnect(domain, service)
|
||||||
) {
|
) {
|
||||||
throw err;
|
throw err;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user