From 1096d3293e0b4db7ecf94da42ccd8c8b22b38451 Mon Sep 17 00:00:00 2001 From: Viktor Hesselbom Date: Tue, 7 Feb 2017 11:22:43 +0100 Subject: [PATCH] Use customHistory url instead of internal url in render if available --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 437ceeee..be561d23 100644 --- a/src/index.js +++ b/src/index.js @@ -231,6 +231,10 @@ class Router extends Component { } render({ children, onChange }, { url }) { + if (customHistory && customHistory.location) { + url = `${customHistory.location.pathname || ''}${customHistory.location.search || ''}`; + } + let active = this.getMatchingChildren(children, url, true); let current = active[0] || null;