diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-06-12 10:14:00 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-06-12 10:14:00 +0200 |
commit | 8915ed6b738fd605ab15798784c0c688b107855b (patch) | |
tree | 07744f4fab2710511f4114cdb9e638ed53eafd8e /lib/util.js | |
parent | b7d1189321fdcaee248d59573e53fdf2a6a2d1d9 (diff) | |
download | bugzilla-triage-8915ed6b738fd605ab15798784c0c688b107855b.tar.gz |
Even more simplification
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/util.js b/lib/util.js index b019022..e14fcb1 100644 --- a/lib/util.js +++ b/lib/util.js @@ -30,7 +30,7 @@ var urlMod = require("url"); */ exports.heir = function heir(p) { function f() {}; - f.prototype = p.prototype; + f.prototype = p.prototype; return new f(); }; @@ -38,6 +38,9 @@ exports.heir = function heir(p) { var getBugNo = exports.getBugNo = function getBugNo(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]) { bugNo = reResult[1]; |