Skip to content

Commit

Permalink
fix(rehype-docz): scope for playground
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Nov 23, 2018
1 parent 3f47074 commit 677a785
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rehype-docz/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const addPropsOnPlayground = async (
if (isPlayground(name)) {
const formatted = await format(nodeToString(node))
const code = formatted.slice(1, Infinity)
const scope = `{props,${scopes.join(',')}}`
const scope = `{props: this ? this.props : props,${scopes.join(',')}}`
const child = jsx.sanitizeCode(jsx.removeTags(code))

node.value = node.value.replace(
Expand Down

0 comments on commit 677a785

Please sign in to comment.