mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +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) {
|
||||
const [domain, service] = this._serviceData.service.split(".", 2);
|
||||
if (
|
||||
err.error.code === ERR_CONNECTION_LOST &&
|
||||
err.error?.code === ERR_CONNECTION_LOST &&
|
||||
serviceCallWillDisconnect(domain, service)
|
||||
) {
|
||||
return;
|
||||
|
@ -81,7 +81,7 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
|
||||
)) as Promise<ServiceCallResponse>;
|
||||
} catch (err) {
|
||||
if (
|
||||
err.error.code === ERR_CONNECTION_LOST &&
|
||||
err.error?.code === ERR_CONNECTION_LOST &&
|
||||
serviceCallWillDisconnect(domain, service)
|
||||
) {
|
||||
throw err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user