aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/util.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-19 00:19:53 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:45:52 +0200
commit50c6825e5d1aecca1edc75b305e28fce86e12b36 (patch)
treecaa56c933d0e01d48df2550ba20b7d5daea1591d /data/lib/util.js
parent3371681e2fd62add63543f6229d5339698460d28 (diff)
downloadbugzilla-triage-50c6825e5d1aecca1edc75b305e28fce86e12b36.tar.gz
Working on analysis of bug-page-mod module.
* Add some notes * remove getBugNumber and replaced with my getBugNo.
Diffstat (limited to 'data/lib/util.js')
-rw-r--r--data/lib/util.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/data/lib/util.js b/data/lib/util.js
index 6256171..40a782f 100644
--- a/data/lib/util.js
+++ b/data/lib/util.js
@@ -64,8 +64,12 @@ function parseXMLfromString (inStuff) {
* Get a bug no
*/
function getBugNo() {
- console.log("bugNo = " + document.forms.namedItem('changeform').getElementsByName("id")[0].value);
- return document.forms.namedItem('changeform').getElementsByName("id")[0].value;
+ var bugNoElem = document.forms.namedItem('changeform').getElementsByName("id")[0];
+ if (bugNoElem) {
+ return bugNoElem.value;
+ } else {
+ return null;
+ }
}
/**