diff options
author | Byron Jones <glob@mozilla.com> | 2014-09-25 06:59:33 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-09-25 06:59:33 +0200 |
commit | ce91bc0428b2ec584de0672c8d5e681d3b52655c (patch) | |
tree | bbbbb698dba9c77ea0188746bc201adbd149387e /extensions/Needinfo/template/en/default | |
parent | 9f07124912d27f366ec50f94378026529ce18cde (diff) | |
download | bugzilla-ce91bc0428b2ec584de0672c8d5e681d3b52655c.tar.gz bugzilla-ce91bc0428b2ec584de0672c8d5e681d3b52655c.tar.xz |
Bug 1072105: "TypeError: summary_container is null" when creating an attachment
Diffstat (limited to 'extensions/Needinfo/template/en/default')
-rw-r--r-- | extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl index d334f232b..5edd70f72 100644 --- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl +++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl @@ -40,23 +40,25 @@ [% IF needinfo_flags.size > 0 %] [%# Displays NEEDINFO tag in bug header %] <script> - var needinfo_comment_div = '[% INCLUDE needinfo_comment_div FILTER js %]'; var summary_container = document.getElementById('static_bug_status'); - if (document.getElementById('inline-history-ext')) { - needinfo_comment_div = inline_history.getNeedinfoDiv(); - } + if (summary_container) { + var needinfo_comment_div = '[% INCLUDE needinfo_comment_div FILTER js %]'; + if (document.getElementById('inline-history-ext')) { + needinfo_comment_div = inline_history.getNeedinfoDiv(); + } - if (needinfo_comment_div) { - var a = document.createElement('a'); - a.id = 'needinfo-lnk'; - a.href = "#" + needinfo_comment_div; - a.appendChild(document.createTextNode('NEEDINFO')); - summary_container.appendChild(document.createTextNode('[')); - summary_container.appendChild(a); - summary_container.appendChild(document.createTextNode(']')); - } - else { - summary_container.appendChild(document.createTextNode('[NEEDINFO]')); + if (needinfo_comment_div) { + var a = document.createElement('a'); + a.id = 'needinfo-lnk'; + a.href = "#" + needinfo_comment_div; + a.appendChild(document.createTextNode('NEEDINFO')); + summary_container.appendChild(document.createTextNode('[')); + summary_container.appendChild(a); + summary_container.appendChild(document.createTextNode(']')); + } + else { + summary_container.appendChild(document.createTextNode('[NEEDINFO]')); + } } </script> [% END %] |