From 8962955e9571d5eff696f51f38bc7ac53feebfe4 Mon Sep 17 00:00:00 2001 From: Kyle Holmberg Date: Thu, 6 May 2021 13:05:32 -0700 Subject: [PATCH] pass current layout state to page file --- src/with-layout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/with-layout.js b/src/with-layout.js index ae47225..d4c295d 100644 --- a/src/with-layout.js +++ b/src/with-layout.js @@ -8,7 +8,7 @@ const toFunction = (fn) => typeof fn === 'function' ? fn : () => fn; const getInitialLayoutTreeSymbol = Symbol('getInitialLayoutTreeSymbol'); const withLayout = (mapLayoutStateToLayoutTree, mapPropsToInitialLayoutState) => { - const shouldInjectSetLayoutState = typeof mapLayoutStateToLayoutTree === 'function'; + const shouldInjectLayoutStateProps = typeof mapLayoutStateToLayoutTree === 'function'; mapLayoutStateToLayoutTree = toFunction(mapLayoutStateToLayoutTree); mapPropsToInitialLayoutState = toFunction(mapPropsToInitialLayoutState); @@ -49,7 +49,7 @@ const withLayout = (mapLayoutStateToLayoutTree, mapPropsToInitialLayoutState) => return useMemo(() => ( ), [ref, setLayoutState, props]); });