Skip to content

Commit 238c8b1

Browse files
committed
fix(cmd.action): can be array too (besides closure/null)
1 parent 215ed10 commit 238c8b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Input/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ public function action(callable $action = null)
413413
return $this->_action;
414414
}
415415

416-
$this->_action = $action ? \Closure::bind($action, $this) : null;
416+
$this->_action = $action instanceof \Closure ? \Closure::bind($action, $this) : $action;
417417

418418
return $this;
419419
}

0 commit comments

Comments
 (0)