mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 13:27:22 +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;
|
||||
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
|
||||
// the equivalent string format
|
||||
let { hours = 0, minutes = 0, seconds = 0 } = trgFor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user