Skip to content

Commit

Permalink
Keep document.location up-to-date in frameback frame (#332)
Browse files Browse the repository at this point in the history
Important for tracking page views, etc.
  • Loading branch information
gigabo authored Jul 1, 2016
1 parent 0e3bb5c commit de46ddb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-server/core/ClientController.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ class ClientController extends EventEmitter {
reuseDom: true,
});
}
} else if (this._history) {

// We're in a frameback frame, but we want to make sure that the
// frame's `document.location` stays up to date.
window.history.replaceState(null, null, url);
}

// If we've got control of the URL bar we'll also take responsibility
Expand Down

0 comments on commit de46ddb

Please sign in to comment.