Commit d11c0d86ea356608a98833dd8e9215781ff3bc08

Thomas de Grivel 2022-02-01T17:36:43

fix repo create

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/lib/kmxgit_web/templates/repository/show_actions.html.heex b/lib/kmxgit_web/templates/repository/show_actions.html.heex
index 995396e..e2cd3c9 100644
--- a/lib/kmxgit_web/templates/repository/show_actions.html.heex
+++ b/lib/kmxgit_web/templates/repository/show_actions.html.heex
@@ -6,6 +6,6 @@
 <%= if @current_user do %>
   <%= link gettext("Fork"), to: Routes.repository_path(@conn, :fork, Repository.owner_slug(@repo), Repository.splat(@repo)), class: "btn btn-primary" %>
 <% end %>
-<%= if (@tree != "master") do %>
+<%= if (@tree && @tree != "master") do %>
   <%= link gettext("Diff"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_diff", @tree, "master"])), class: "btn btn-primary" %>
 <% end %>