From e603d23744a324e12183d8d2141d0bf77458726d Mon Sep 17 00:00:00 2001 From: David Bonnet Date: Mon, 4 Feb 2019 10:16:39 +0100 Subject: [PATCH] fix(tools): better handle `null` propNames --- src/tools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools.js b/src/tools.js index 44d8ef45..a662ec3f 100644 --- a/src/tools.js +++ b/src/tools.js @@ -196,10 +196,10 @@ export function logProps(propNames, title) { /* Logs the provided `propNames` whenever they change. The `title` defaults to the component name. - If no `propNames` are provided, logs all props. + If `propNames` is `nil`, logs all props. */ return Component => - onPropsChange(propNames, props => { + onPropsChange(propNames || undefined, props => { /* eslint-disable no-console */ console.group(title || Component.displayName || Component.name) for (let name of propNames || keys(props)) {