Permalink
Browse files

#662: Safe guard null doCcList/doBccList in changeComposeFields.

  • Loading branch information...
1 parent 1d71b44 commit 4131d6b51a0b54a7f2611ddf8ee9b86af9d39387 U-morrisville\nauhygon committed Oct 27, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 content/stub.compose-ui.js
@@ -585,12 +585,13 @@ ComposeSession.prototype = {
let defaultCc = "";
let defaultBcc = "";
if (identity.doCc)
- defaultCc = identity.doCcList;
+ defaultCc = identity.doCcList || "";
if (identity.doBcc)
- defaultBcc = identity.doBccList;
+ defaultBcc = identity.doBccList || "";
let mergeDefault = function (aList, aDefault) {
- aDefault = aDefault.replace(/\s/g, "");
+ if (aDefault)
+ aDefault = aDefault.replace(/\s/g, "");
if (!aDefault) // "" evaluates to false
return aList;
for each (let [, email] in Iterator(aDefault.split(/,/))) {

0 comments on commit 4131d6b

Please sign in to comment.