Skip to content

Commit 273826d

Browse files
committed
Moved MultiChoiceControl condition
1 parent 65f6450 commit 273826d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Form/TAjaxSelect.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ private function getData(string $query = '', $default = null) : \Nepttune\Form\R
135135

136136
private function initiateItems($value = null): void
137137
{
138-
$value = $value ?? $this->value;
139-
$data = [];
140-
141138
if ($this instanceof \Nette\Forms\Controls\MultiChoiceControl) {
142139
$this->value ??= [];
143140
}
144141

142+
$value = $value ?? $this->value;
143+
$data = [];
144+
145145
if (\in_array($value, [null, '', []], true)) {
146146
if (\count($this->items) > 0) {
147147
return;

0 commit comments

Comments
 (0)