Skip to content

Commit

Permalink
Don't use History API for origin 'null' documents (#268).
Browse files Browse the repository at this point in the history
  • Loading branch information
gnab committed Sep 9, 2015
1 parent 41048b9 commit 21cf5d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/remark/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Dom.prototype.getLocationHash = function () {
};

Dom.prototype.setLocationHash = function (hash) {
if (typeof window.history.replaceState === 'function') {
if (typeof window.history.replaceState === 'function' && document.origin !== 'null') {
window.history.replaceState(undefined, undefined, hash);
}
else {
Expand Down

0 comments on commit 21cf5d8

Please sign in to comment.