From ace562ab778cf139df9cc79163912e34f7cdf0eb Mon Sep 17 00:00:00 2001 From: AbdallahMohammed Date: Fri, 8 Jan 2021 18:30:08 +0200 Subject: [PATCH] add more helpers --- src/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form.php b/src/Form.php index 44792a0..37b8c56 100644 --- a/src/Form.php +++ b/src/Form.php @@ -369,7 +369,7 @@ public function mergeDataWhen($condition, Closure $callback) $data = []; if ((is_integer($condition) && $this->isStep($this->getStepId($condition))) || (is_bool($condition) && $condition === true) - || (is_callable($condition) && is_bool(value($condition($this))))) { + || (is_callable($condition) && is_bool(value($condition($this))) && value($condition($this)) === true)) { $data = value($callback($this)); }