Skip to content

Commit

Permalink
fix: include the missing data required for detail preview (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsobries authored Oct 12, 2022
1 parent 247f3cd commit d4dd802
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/EnhancedMarkdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ public function renderer()
*/
public function jsonSerialize(): array
{
$serialized = parent::jsonSerialize();

$serialized['preset'] = $this->preset;

return $serialized;
return array_merge(parent::jsonSerialize(), [
'shouldShow' => $this->shouldBeExpanded(),
'preset' => $this->preset,
'previewFor' => $this->previewFor($this->value ?? ''),
]);
}
}

0 comments on commit d4dd802

Please sign in to comment.