@carbonorm/carbonreact 4.0.17 → 4.0.19

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
3
  "license": "MIT",
4
- "version": "4.0.17",
4
+ "version": "4.0.19",
5
5
  "browser": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "main": "dist/index.cjs.js",
@@ -10,7 +10,7 @@ import {initialRestfulObjectsState, iRestfulObjectArrayTypes} from "variables/C6
10
10
  import CarbonWebSocket, {iCarbonWebSocketProps} from "./components/WebSocket/CarbonWebSocket";
11
11
  import updateRestfulObjectArrays, {iUpdateRestfulObjectArrays} from "./hoc/updateRestfulObjectArrays";
12
12
  import deleteRestfulObjectArrays, {iDeleteRestfulObjectArrays} from "./hoc/deleteRestfulObjectArrays";
13
- import {BrowserRouter, HashRouter, MemoryRouter, Routes} from "react-router-dom";
13
+ import {BrowserRouter, HashRouter, MemoryRouter} from "react-router-dom";
14
14
 
15
15
  export type tStatefulApiData<T extends { [key: string]: any } = {}> = T[] | undefined | null;
16
16
 
@@ -168,7 +168,7 @@ abstract class CarbonReact<P = {}, S extends iCarbonReactState = iCarbonReactSta
168
168
  }
169
169
 
170
170
  reactRouterContext(children: ReactElement) {
171
- switch (this.props.routerType) {
171
+ switch (this.props.routerType ?? eRouterType.BrowserRouter) {
172
172
  case eRouterType.BrowserRouter:
173
173
  return <BrowserRouter>{children}</BrowserRouter>
174
174
  case eRouterType.MemoryRouter:
@@ -199,7 +199,7 @@ abstract class CarbonReact<P = {}, S extends iCarbonReactState = iCarbonReactSta
199
199
  this.context = createContext(this.state)
200
200
  const Context = this.context.Provider;
201
201
 
202
- return this.reactRouterContext(<Routes>
202
+ return this.reactRouterContext(<>
203
203
  <GlobalHistory/>
204
204
  {this.props.websocket &&
205
205
  <CarbonWebSocket<P, S> {...(false !== this.props.websocket ? this.props.websocket : {})}
@@ -208,7 +208,7 @@ abstract class CarbonReact<P = {}, S extends iCarbonReactState = iCarbonReactSta
208
208
  {this.props.children}
209
209
  </Context>
210
210
  <ToastContainer/>
211
- </Routes>);
211
+ </>);
212
212
  }
213
213
  }
214
214