From a054e17d087eaf9271a1923019aa853d67dbc25f Mon Sep 17 00:00:00 2001 From: sunrise Date: Fri, 19 Jun 2020 10:17:07 +0700 Subject: [PATCH] Fix order of parameters --- src/rehook/with-props-on-change.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rehook/with-props-on-change.js b/src/rehook/with-props-on-change.js index 246e123..dfcc700 100644 --- a/src/rehook/with-props-on-change.js +++ b/src/rehook/with-props-on-change.js @@ -22,7 +22,7 @@ const withPropsOnChange = (shouldMapOrKeys, createProps) => (props = {}) => { const keys = Array.isArray(shouldMapOrKeys) ? shouldMapOrKeys.map(key => props[key]) - : shouldMapOrKeys(props, previousProps) + : shouldMapOrKeys(previousProps, props) ? undefined : []