We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 65b3537 + 30dbe6f commit 3a593a4Copy full SHA for 3a593a4
webcompat/static/js/lib/issues.js
@@ -31,10 +31,14 @@ issues.TitleView = Backbone.View.extend({
31
location.origin = location.protocol + '//' + location.host;
32
}
33
34
- // Only go back in history if we came from the /issues page.
35
- if (document.referrer.indexOf(location.origin + '/issues') === 0) {
+ // Only go back in history if we came from the /issues page and there's
+ // actually some history to go back to
36
+ if ((document.referrer.indexOf(location.origin + '/issues') === 0) &&
37
+ (history.length !== 1)) {
38
history.back();
39
e.preventDefault();
40
+ } else {
41
+ location.href = '/issues';
42
43
44
});
0 commit comments