Skip to content

Commit

Permalink
feat: evaluate conditions on init
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur authored and kevinchappell committed Aug 30, 2020
1 parent dfb6e62 commit bb5a08f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ export default class FormeoRenderer {
false
)
}

// Evaluate conditions on load.
const fakeEvt = { target: component } // We don't have an actual event, mock one.
this.evaluateCondition(ifRest, fakeEvt) &&
thenConditions.forEach(thenCondition => this.execResult(thenCondition, fakeEvt))
})
}
})
Expand Down

0 comments on commit bb5a08f

Please sign in to comment.