Skip to content

Commit 226aa57

Browse files
committed
Fix Undefined property: Yajra\DataTables\Html\Builder::$instance
1 parent fe869c9 commit 226aa57

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Html/HasEditor.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ public function editors(...$editors): static
2626
$editors = $editors[0];
2727
}
2828

29-
$collection = [];
29+
$this->editors = [];
30+
3031
foreach ($editors as $editor) {
31-
$collection[] = $this->editor($editor);
32+
if ($editor instanceof Editor) {
33+
$this->editor($editor);
34+
} else {
35+
$this->editor(new Editor($editor));
36+
}
3237
}
3338

34-
$this->editors = $collection;
35-
3639
return $this;
3740
}
3841

0 commit comments

Comments
 (0)