aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util.js b/lib/util.js
index b165567..b2a093c 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -36,15 +36,17 @@ exports.heir = function heir(p) {
exports.getBugNo = function getBugNo(url) {
+ console.log("url = " + url);
var re = new RegExp(".*id=([0-9]+).*$");
var bugNo = null;
if (!url) {
throw new Error("Missing URL value!");
}
var reResult = re.exec(url);
- if (reResult[1]) {
+ if (reResult && reResult[1]) {
bugNo = reResult[1];
}
+ console.log("bugNo = " + bugNo);
return bugNo;
};