Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit b5d220c

Browse files
committed
don't replace the iframe window if it's a hash
1 parent 751105c commit b5d220c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

public/styleguide/js/postmessage.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ if (self != top) {
2929
for (a in aTags) {
3030
aTags[a].onclick = function(e) {
3131
e.preventDefault();
32-
window.location.replace(this.getAttribute("href"));
32+
var href = this.getAttribute("href");
33+
if (href != "#") {
34+
window.location.replace(href);
35+
}
3336
};
3437
}
3538

0 commit comments

Comments
 (0)