Changed the condition node so that the condition is evaluated as a function returning a promise