diff --git a/lib/link.js b/lib/link.js index 9f499f2c18dc10f334487ceaa291148b5407258d..4b3e271e36e676265f66b728c1937ca1290ced8e 100644 --- a/lib/link.js +++ b/lib/link.js @@ -26,7 +26,8 @@ export default class Link extends Component { return null } - ]).isRequired + ]).isRequired, + shallow: PropTypes.bool } componentWillReceiveProps (nextProps) { @@ -40,6 +41,7 @@ export default class Link extends Component { return } + let { shallow } = this.props let { href, as } = this if (!isLocal(href)) { @@ -64,7 +66,7 @@ export default class Link extends Component { const changeMethod = replace ? 'replace' : 'push' // straight up redirect - Router[changeMethod](href, as) + Router[changeMethod](href, as, { shallow }) .then((success) => { if (!success) return if (scroll) window.scrollTo(0, 0)