aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bugzillaBugTriage.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index dcb6130..619ed33 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -654,8 +654,9 @@ Logger.prototype.addLogRecord = function(that) {
rec.url = that.doc.location.toString();
rec.title = that.title;
let comment = jetpack.tabs.focused.contentWindow.prompt(
- "Enter comments for this comment").trim();
- if (comment.length > 0) {
+ "Enter comments for this comment");
+ if (comment && comment.length > 0) {
+ comment = comment.trim();
console.log("comment = " + comment);
console.log("");
rec.comment = comment;
@@ -1424,7 +1425,9 @@ BZPage.prototype.setUpLogging = function() {
console.log("Installing submit callback!");
this.doc.forms.namedItem("changeform").addEventListener("submit",function (evt) {
console.log("Submit callback!");
- if (that.log.addLogRecord(that) === null) {
+ let resp = that.log.addLogRecord(that);
+ console.log("resp = " + resp);
+ if (resp === null) {
console.log("Avoiding submitting!");
// FIXME doesn't work ... still submitting'
evt.stopPropagation();