mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix unsafe optional chaining (#15604)
This commit is contained in:
parent
d4ace99de3
commit
7568ae5964
@ -59,7 +59,6 @@
|
|||||||
"prefer-destructuring": "off",
|
"prefer-destructuring": "off",
|
||||||
"no-restricted-globals": [2, "event"],
|
"no-restricted-globals": [2, "event"],
|
||||||
"prefer-promise-reject-errors": "off",
|
"prefer-promise-reject-errors": "off",
|
||||||
"no-unsafe-optional-chaining": "warn",
|
|
||||||
"import/prefer-default-export": "off",
|
"import/prefer-default-export": "off",
|
||||||
"import/no-default-export": "off",
|
"import/no-default-export": "off",
|
||||||
"import/no-unresolved": "off",
|
"import/no-unresolved": "off",
|
||||||
|
@ -72,7 +72,7 @@ class DialogZHAReconfigureDevice extends LitElement {
|
|||||||
this.hass,
|
this.hass,
|
||||||
this.hass.localize(`ui.dialogs.zha_reconfigure_device.heading`) +
|
this.hass.localize(`ui.dialogs.zha_reconfigure_device.heading`) +
|
||||||
": " +
|
": " +
|
||||||
(this._params?.device.user_given_name || this._params?.device.name)
|
(this._params.device.user_given_name || this._params.device.name)
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
${!this._status
|
${!this._status
|
||||||
|
@ -183,7 +183,7 @@ class HuiGaugeCard extends LitElement implements LovelaceCard {
|
|||||||
// new format
|
// new format
|
||||||
let segments = this._config!.segments;
|
let segments = this._config!.segments;
|
||||||
if (segments) {
|
if (segments) {
|
||||||
segments = [...segments].sort((a, b) => a?.from - b?.from);
|
segments = [...segments].sort((a, b) => a.from - b.from);
|
||||||
|
|
||||||
for (let i = 0; i < segments.length; i++) {
|
for (let i = 0; i < segments.length; i++) {
|
||||||
const segment = segments[i];
|
const segment = segments[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user