Skip to content

Commit

Permalink
Meta: Fix link-fixup.js following a change in wattsi
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan authored and domenic committed Aug 31, 2017
1 parent 37a3ae8 commit 21ffd24
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions link-fixup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@
}
}

var page = fragmentLinks[fragid];
if (page) {
window.location.replace(page + '.html#' + encodeURIComponent(fragid));
if (fragid in fragmentLinks) {
var page = fragmentLinks[fragid];
if (page === '') {
page = './';
} else {
page += '.html';
}
window.location.replace(page + '#' + encodeURIComponent(fragid));
}
};
xhr.send();
Expand Down

0 comments on commit 21ffd24

Please sign in to comment.