Skip to content

Commit

Permalink
Keep document.location up-to-date in frameback frame (redfin#332)
Browse files Browse the repository at this point in the history
Important for tracking page views, etc.
  • Loading branch information
gigabo authored and davidalber committed Jul 24, 2016
1 parent 3e0188b commit 50be785
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 50be785

Please sign in to comment.