From 94c0016caddb300fc7fccf2cb4cbd99e161d0d4e Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Thu, 7 Jul 2022 18:42:21 +0300 Subject: [PATCH] added fallback --- src/common/useModelState.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/useModelState.js b/src/common/useModelState.js index 36d2f9a51..c552e7455 100644 --- a/src/common/useModelState.js +++ b/src/common/useModelState.js @@ -36,7 +36,7 @@ function wrapPromise(promise) { }; } -const withGetInitState = (Component) => { +const withGetInitState = (Component, Fallback = () => { }) => { return function WithGetInitState(props) { const { core } = useServices(); const initStateRef = React.useRef({}); @@ -48,7 +48,7 @@ const withGetInitState = (Component) => { return initStateRef.current[model].read(); }, []); return ( - + }>