Skip to content

Commit

Permalink
bugfix: fail on build AttachmentAction without confirm (fixes #1, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alek13 committed Jan 8, 2018
1 parent f0ace00 commit 32fbc79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AttachmentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@ public function setConfirm($confirm)
*/
public function toArray()
{
$confirm = $this->getConfirm();

return [
'name' => $this->getName(),
'text' => $this->getText(),
'style' => $this->getStyle(),
'type' => $this->getType(),
'value' => $this->getValue(),
'confirm' => $this->getConfirm()->toArray(),
'confirm' => $confirm ? $confirm->toArray() : null,
];
}
}

0 comments on commit 32fbc79

Please sign in to comment.