Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[fixed] use destructuring instead of [0] to retrieve the first elem…
Browse files Browse the repository at this point in the history
…ent of an array
  • Loading branch information
thealjey committed Jan 21, 2017
1 parent 5669a2e commit 47a689d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function markdownToUnwrappedHTML(markdown: string): string {
if (1 !== children.length) {
return html;
}
const child = children[0],
const [child] = children,
{type, name} = child;

return 'tag' === type && 'p' === name ? dom(child).html() : html;
Expand Down

0 comments on commit 47a689d

Please sign in to comment.