Skip to content

Commit 0bb7605

Browse files
authored
Merge pull request #421 from GoogleChrome/back-button-fix
Fix back button
2 parents 9e644b7 + 16b0786 commit 0bb7605

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

public/js/gulliver.es6.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ class Gulliver {
179179
*/
180180
setupBacklink() {
181181
document.querySelector('a#backlink').addEventListener('click', _ => {
182+
if (!document.referrer.startsWith(document.location.origin)) {
183+
this.router.navigate('/');
184+
return;
185+
}
182186
window.history.back();
183187
});
184188
}

0 commit comments

Comments
 (0)