aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-09-25 18:42:50 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-09-25 18:42:50 +0200
commit40a89f9f9305a9ccbd1a440ecc6e8463798d8697 (patch)
treea7924b3b5104ab03d81dd0c69122d6c51fd40e24
parent9f0a351e875dd5464cdc5562b572eabe44d131b0 (diff)
downloadbugzilla-triage-40a89f9f9305a9ccbd1a440ecc6e8463798d8697.tar.gz
Make jslint more happy.
-rw-r--r--lib/bzpage.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js
index 5a1751a..537a3f6 100644
--- a/lib/bzpage.js
+++ b/lib/bzpage.js
@@ -490,8 +490,12 @@ BZPage.prototype.createNewButton = function createNewButton (location, after, pk
originalLocation.parentNode.insertBefore(this.doc
.createTextNode("\u00A0"), originalLocation);
}
- } catch (e if e instanceof TypeError) {
- console.error("cannot find originalLocation element with id " + location);
+ } catch (e) {
+ if (e instanceof TypeError) {
+ console.error("cannot find originalLocation element with id " + location);
+ } else {
+ throw e;
+ }
}
};
@@ -573,7 +577,7 @@ BZPage.prototype.parseMailto = function parseMailto(aElement) {
//
if (emailStr === undefined) {
var params = util.getParamsFromURL("https://" + this.hostname + "/" + hrefStr);
- emailStr = decodeURI(params['login']);
+ emailStr = decodeURI(params.login);
}
return emailStr;
}
@@ -668,7 +672,7 @@ BZPage.prototype.selectOptionByLabel = function selectOptionByLabel(id, label, f
var sel = this.doc.getElementById(id);
var labelRE = new RegExp(label.trim());
var ourOption = Array.filter(sel.options, function (op) {
- return op.textContent.trim() == label;
+ return op.textContent.trim() === label;
}, this);
if (ourOption[0]) {