react-toolkits 2.11.7 → 2.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.11.8
4
+
5
+ ### Patch Changes
6
+
7
+ - ec15f55: fix: missing 'signInPath' in ToolkitsProvider
8
+
3
9
  ## 2.11.7
4
10
 
5
11
  ### Patch Changes
package/lib/index.js CHANGED
@@ -382,14 +382,14 @@ var init_Provider = __esm({
382
382
  ToolkitsContext = createContext(null);
383
383
  ToolkitsProvider = (props) => {
384
384
  const { children, ...restProps } = props;
385
- if (!restProps.signInPath) {
386
- throw new Error('ToolkitsProvider: \u8BF7\u914D\u7F6E "signInPath"');
387
- }
388
385
  const storeRef = useRef();
389
386
  if (!storeRef.current) {
390
387
  storeRef.current = createToolkitsStore({ ...globalState, ...restProps });
391
388
  }
392
389
  globalState = storeRef.current.getState();
390
+ if (!globalState.signInPath) {
391
+ throw new Error('ToolkitsProvider: \u8BF7\u914D\u7F6E "signInPath"');
392
+ }
393
393
  return /* @__PURE__ */ jsx(ToolkitsContext.Provider, { value: storeRef.current, children: /* @__PURE__ */ jsx(App, { children: /* @__PURE__ */ jsx(
394
394
  SWRConfig,
395
395
  {