Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default class Markup extends Component {
}
}

render({ wrap=true, type, markup, components, reviver, onError, 'allow-scripts':allowScripts, 'allow-events':allowEvents, trim, ...props }) {
render() {
let { wrap=true, type, markup, components, reviver, onError, 'allow-scripts':allowScripts, 'allow-events':allowEvents, trim, ...props } = this.props;
let h = reviver || this.reviver || this.constructor.prototype.reviver || customReviver || defaultReviver,
vdom;

Expand Down
4 changes: 2 additions & 2 deletions src/markup-to-vdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export default function markupToVdom(markup, type, reviver, map, options) {
let vdom = body && toVdom(body, visitor, reviver, options);
visitor.map = null;


return vdom && vdom.children || null;
// Return VDOM children for reviver (Preact uses children where React uses props.children).
return vdom && (vdom.children || vdom.props.children) || null;
}

function toCamelCase(name) {
Expand Down