@umijs/renderer-react 3.5.37 → 3.5.39

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/dist/index.esm.js CHANGED
@@ -517,6 +517,7 @@ function RouterComponent(props) {
517
517
  }
518
518
 
519
519
  function routeChangeHandler(location, action) {
520
+ var isFirst = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
520
521
  var matchedRoutes = matchRoutes(props.routes, location.pathname); // Set title
521
522
 
522
523
  if (typeof document !== 'undefined' && renderRoutesProps.defaultTitle !== undefined) {
@@ -531,12 +532,13 @@ function RouterComponent(props) {
531
532
  routes: props.routes,
532
533
  matchedRoutes: matchedRoutes,
533
534
  location: location,
534
- action: action
535
+ action: action,
536
+ isFirst: isFirst
535
537
  }
536
538
  });
537
539
  }
538
540
 
539
- routeChangeHandler(history.location, 'POP');
541
+ routeChangeHandler(history.location, 'POP', true);
540
542
  return history.listen(routeChangeHandler);
541
543
  }, [history]);
542
544
  return /*#__PURE__*/React.createElement(Router, {
package/dist/index.js CHANGED
@@ -525,6 +525,7 @@ function RouterComponent(props) {
525
525
  }
526
526
 
527
527
  function routeChangeHandler(location, action) {
528
+ var isFirst = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
528
529
  var matchedRoutes = reactRouterConfig.matchRoutes(props.routes, location.pathname); // Set title
529
530
 
530
531
  if (typeof document !== 'undefined' && renderRoutesProps.defaultTitle !== undefined) {
@@ -539,12 +540,13 @@ function RouterComponent(props) {
539
540
  routes: props.routes,
540
541
  matchedRoutes: matchedRoutes,
541
542
  location: location,
542
- action: action
543
+ action: action,
544
+ isFirst: isFirst
543
545
  }
544
546
  });
545
547
  }
546
548
 
547
- routeChangeHandler(history.location, 'POP');
549
+ routeChangeHandler(history.location, 'POP', true);
548
550
  return history.listen(routeChangeHandler);
549
551
  }, [history]);
550
552
  return /*#__PURE__*/React__default['default'].createElement(runtime.Router, {
@@ -460,6 +460,7 @@ function RouterComponent(props) {
460
460
  }
461
461
 
462
462
  function routeChangeHandler(location, action) {
463
+ var isFirst = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
463
464
  var matchedRoutes = matchRoutes(props.routes, location.pathname); // Set title
464
465
 
465
466
  if (typeof document !== 'undefined' && renderRoutesProps.defaultTitle !== undefined) {
@@ -474,12 +475,13 @@ function RouterComponent(props) {
474
475
  routes: props.routes,
475
476
  matchedRoutes: matchedRoutes,
476
477
  location: location,
477
- action: action
478
+ action: action,
479
+ isFirst: isFirst
478
480
  }
479
481
  });
480
482
  }
481
483
 
482
- routeChangeHandler(history.location, 'POP');
484
+ routeChangeHandler(history.location, 'POP', true);
483
485
  return history.listen(routeChangeHandler);
484
486
  }, [history]);
485
487
  return /*#__PURE__*/React.createElement(Router, {
package/dist/index18.js CHANGED
@@ -469,6 +469,7 @@ function RouterComponent(props) {
469
469
  }
470
470
 
471
471
  function routeChangeHandler(location, action) {
472
+ var isFirst = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
472
473
  var matchedRoutes = reactRouterConfig.matchRoutes(props.routes, location.pathname); // Set title
473
474
 
474
475
  if (typeof document !== 'undefined' && renderRoutesProps.defaultTitle !== undefined) {
@@ -483,12 +484,13 @@ function RouterComponent(props) {
483
484
  routes: props.routes,
484
485
  matchedRoutes: matchedRoutes,
485
486
  location: location,
486
- action: action
487
+ action: action,
488
+ isFirst: isFirst
487
489
  }
488
490
  });
489
491
  }
490
492
 
491
- routeChangeHandler(history.location, 'POP');
493
+ routeChangeHandler(history.location, 'POP', true);
492
494
  return history.listen(routeChangeHandler);
493
495
  }, [history]);
494
496
  return /*#__PURE__*/React__default['default'].createElement(runtime.Router, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/renderer-react",
3
- "version": "3.5.37",
3
+ "version": "3.5.39",
4
4
  "description": "@umijs/renderer-react",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@types/react": "^16.9.43",
29
29
  "@types/react-dom": "^16.9.8",
30
30
  "@types/react-router-config": "^5.0.2",
31
- "@umijs/runtime": "3.5.37",
31
+ "@umijs/runtime": "3.5.39",
32
32
  "react-router-config": "5.1.1"
33
33
  },
34
34
  "peerDependencies": {