summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/journals/diff.html.erb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb
index 21b8755e7..4d425f378 100644
--- a/app/views/journals/diff.html.erb
+++ b/app/views/journals/diff.html.erb
@@ -5,6 +5,9 @@
<%= simple_format_without_paragraph @diff.to_html %>
</div>
-<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>
+<p>
+ <%= link_to(l(:button_back), issue_path(@issue),
+ :onclick => 'if (history.length > 1) {history.back(); return false;}') %>
+</p>
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>