Skip to content

Commit 21ffd24

Browse files
zcorpandomenic
authored andcommitted
Meta: Fix link-fixup.js following a change in wattsi
See whatwg/wattsi#59.
1 parent 37a3ae8 commit 21ffd24

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

link-fixup.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
}
2626
}
2727

28-
var page = fragmentLinks[fragid];
29-
if (page) {
30-
window.location.replace(page + '.html#' + encodeURIComponent(fragid));
28+
if (fragid in fragmentLinks) {
29+
var page = fragmentLinks[fragid];
30+
if (page === '') {
31+
page = './';
32+
} else {
33+
page += '.html';
34+
}
35+
window.location.replace(page + '#' + encodeURIComponent(fragid));
3136
}
3237
};
3338
xhr.send();

0 commit comments

Comments
 (0)