Skip to content

Commit

Permalink
feat(form): upd getProcessMessages method, fix issue with getting m…
Browse files Browse the repository at this point in the history
…essages #25
  • Loading branch information
Awilum committed Jun 6, 2021
1 parent 351c328 commit 6252d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function getProcessFields(): array
*/
public function getProcessMessages(string $type, array $data = []): string
{
return $this->storage['properties']['process']->has('messages' . $type) ? flextype('twig')->fetchFromString($this->storage['properties']['process']->get('messages' . $type), (count($data) > 0 ? $data : $this->storage['vars']->toArray())) : '';
return $this->storage['properties']['process']->has('messages.' . $type) ? strings(flextype('twig')->fetchFromString($this->storage['properties']['process']->get('messages.' . $type), (count($data) > 0 ? $data : $this->storage['vars']->toArray())))->trim()->toString() : '';
}

/**
Expand Down

0 comments on commit 6252d7f

Please sign in to comment.