From 014417cf9ba961aabea594e64ef32455267f8336 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 23 2016 12:22:14 +0000 Subject: Let's ensure the element we want to use exists and bail otherwise --- diff --git a/pagure/templates/commit.html b/pagure/templates/commit.html index 126a236..f68a19e 100644 --- a/pagure/templates/commit.html +++ b/pagure/templates/commit.html @@ -175,6 +175,9 @@ _br += res.message[i] } var el = $('#diff-file-1'); + if (!el){ + return; + } el.before( '
' + _br + '
');