Skip to content

Commit

Permalink
fix: Process array responses.
Browse files Browse the repository at this point in the history
Some actions return un unprocessed array. Process these so that the environment indicator can be added.
Fixes #11
  • Loading branch information
GuySartorelli committed Dec 1, 2020
1 parent 15647db commit ba55f98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Extensions/EnvBarExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public function beforeCallActionHandler($request, $action)
*/
public function afterCallActionHandler($request, $action, $result)
{
if (is_array($result)) {
$result = $this->owner->getViewer($action)->process($this->owner->customise($result));
}
if (!($result instanceof DBHTMLText)) {
return $result;
}
Expand Down

0 comments on commit ba55f98

Please sign in to comment.