mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 13:56:35 +00:00
Fix checking for syntax if for doesn't exist (#1769)
This commit is contained in:
parent
3949b47e51
commit
f1bd89fd02
@ -26,7 +26,7 @@ export default class StateTrigger extends Component {
|
|||||||
const trgFrom = trigger.from;
|
const trgFrom = trigger.from;
|
||||||
let trgFor = trigger.for;
|
let trgFor = trigger.for;
|
||||||
|
|
||||||
if (trgFor.hours || trgFor.minutes || trgFor.seconds) {
|
if (trgFor && (trgFor.hours || trgFor.minutes || trgFor.seconds)) {
|
||||||
// If the trigger was defined using the yaml dict syntax, convert it to
|
// If the trigger was defined using the yaml dict syntax, convert it to
|
||||||
// the equivalent string format
|
// the equivalent string format
|
||||||
let { hours = 0, minutes = 0, seconds = 0 } = trgFor;
|
let { hours = 0, minutes = 0, seconds = 0 } = trgFor;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user