a2e25c4d by Adam Heath

In react, if there is a match, but a null handler, then return

null(which is how to delete elements).
1 parent a63cda21
......@@ -57,7 +57,7 @@ export const Match = (props) => {
const nextDebug = debug ? debug - 1 : 0
for (const [ matcher, Handler ] of replacers) {
if (matcher(node, parent, index, false)) {
return Handler({ debug: nextDebug, parent, node, index, replacers })
return Handler ? Handler({ debug: nextDebug, parent, node, index, replacers }) : null
}
}
if (debug) console.log('Match:nothing', {node})
......