summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-09-25 06:59:33 +0200
committerByron Jones <glob@mozilla.com>2014-09-25 06:59:33 +0200
commitce91bc0428b2ec584de0672c8d5e681d3b52655c (patch)
treebbbbb698dba9c77ea0188746bc201adbd149387e
parent9f07124912d27f366ec50f94378026529ce18cde (diff)
downloadbugzilla-ce91bc0428b2ec584de0672c8d5e681d3b52655c.tar.gz
bugzilla-ce91bc0428b2ec584de0672c8d5e681d3b52655c.tar.xz
Bug 1072105: "TypeError: summary_container is null" when creating an attachment
-rw-r--r--extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl32
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 %]