Skip to content

Commit adad337

Browse files
kimwzjamesdaily
kimwz
authored andcommitted
fix($location): re-assign history after BFCache back on Android browser
Closes angular#5425
1 parent 50e384f commit adad337

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ng/browser.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ function Browser(window, document, $log, $sniffer) {
148148
* @param {boolean=} replace Should new url replace current history record ?
149149
*/
150150
self.url = function(url, replace) {
151-
// Android Browser BFCache causes location reference to become stale.
151+
// Android Browser BFCache causes location, history reference to become stale.
152152
if (location !== window.location) location = window.location;
153+
if (history !== window.history) history = window.history;
153154

154155
// setter
155156
if (url) {

0 commit comments

Comments
 (0)