Created
May 14, 2016 04:04
-
-
Save cameronbourke/44e7d355fdc4ebf99ebf93cf22401b92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handleRouterUpdate = function () { | |
// import bowser from 'bowser'; | |
if (bowser.msedge) { | |
// wrapping in a setTimeout ensures that it runs | |
// after the route has finished transitioning | |
setTimeout(() => { | |
const favicons = document.querySelectorAll('link[rel="icon"]'); | |
Array.prototype.forEach.call(favicons, (fav) => { fav.href = fav.href; }); | |
}, 0); | |
} | |
}; | |
... | |
render () { | |
<Router history={browserHistory} onUpdate={handleRouterUpdate}> | |
... | |
</Router> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
onUpdate is depricated now. How to solve the problem without onUpdate?