From 56552bcaf546199854a6bef40aa41f187b9248af Mon Sep 17 00:00:00 2001 From: Nathan Jansen Date: Mon, 1 Mar 2021 11:34:08 +0100 Subject: [PATCH] Fix for error when no step available --- src/Concerns/WithSteps.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Concerns/WithSteps.php b/src/Concerns/WithSteps.php index a2cc5ab..86ecdd4 100644 --- a/src/Concerns/WithSteps.php +++ b/src/Concerns/WithSteps.php @@ -82,7 +82,7 @@ public function validateStep($step = null, $setNext = true) $data = $this->customValidate($this->mapFields($resolvedFields, $this->store), $rules); if (! $this->model->id) { - $this->completedSteps[] = $step->name; + $this->completedSteps[] = optional($step)->name; } $step = $this->step($step);