Changeset 5f574b


Ignore:
Timestamp:
Apr 9, 2015, 10:56:26 AM (6 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
2c040b
Parents:
3080ee
Message:

prevent errors on missing selectedItem

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • content/vI_storage.js

    r3080ee r5f574b  
    220220
    221221      isDoBcc: function (row, currentWindow) {
     222        if (typeof currentWindow.awGetPopupElement(row).selectedItem == 'undefined')
     223          return false;
    222224        var recipientType = currentWindow.awGetPopupElement(row).selectedItem.getAttribute("value");
    223225        if (recipientType != "addr_bcc" || !getCurrentIdentity().doBcc) return false
  • content/v_identity.js

    r3080ee r5f574b  
    210210        var recipients = [];
    211211        for (var row = 1; row <= top.MAX_RECIPIENTS; row++) {
     212          if (typeof awGetPopupElement(row).selectedItem == 'undefined')
     213            continue;
    212214          var recipientType = awGetPopupElement(row).selectedItem.getAttribute("value");
    213215          if (recipientType == "addr_reply" || recipientType == "addr_followup" ||
     
    222224
    223225      _recipientIsDoBcc: function (row) {
     226        if (typeof awGetPopupElement(row).selectedItem == 'undefined')
     227          return false;
    224228        var recipientType = awGetPopupElement(row).selectedItem.getAttribute("value");
    225229        if (recipientType != "addr_bcc" || !getCurrentIdentity().doBcc) return false
  • modules/vI_replyToSelf.js

    r3080ee r5f574b  
    4747  if (!replyToSelfObj.hasAttribute("hidden")) {
    4848    for (var row = 1; row <= vIcomposeWindow.top.MAX_RECIPIENTS; row++) {
     49      if (typeof vIcomposeWindow.awGetPopupElement(row).selectedItem == 'undefined')
     50        continue;
    4951      var awType = vIcomposeWindow.awGetPopupElement(row).selectedItem.getAttribute("value");
    5052      if (awType == "addr_reply") {
  • modules/vI_smartIdentity.js

    r3080ee r5f574b  
    115115    var recipients = [];
    116116    for (var row = 1; row <= this._currentWindow.top.MAX_RECIPIENTS; row++) {
     117      if (typeof this._currentWindow.awGetPopupElement(row).selectedItem == 'undefined')
     118        continue;
    117119      var recipientType = this._currentWindow.awGetPopupElement(row).selectedItem.getAttribute("value");
    118120      if (recipientType == "addr_reply" || recipientType == "addr_followup" ||
     
    194196    var recipientCount = 0;
    195197    for (var row = 1; row <= this._currentWindow.top.MAX_RECIPIENTS; row++) {
     198      if (typeof this._currentWindow.awGetPopupElement(row).selectedItem == 'undefined')
     199        continue;
    196200      var recipientType = this._currentWindow.awGetPopupElement(row).selectedItem.getAttribute("value");
    197201      if (recipientType == "addr_to" || recipientType == "addr_cc") recipientCount++;
     
    203207      var popup = this._currentWindow.awGetPopupElement(row);
    204208      var input = this._currentWindow.awGetInputElement(row);
     209      if (typeof popup.selectedItem == 'undefined')
     210        continue;
    205211      var recipientType = popup.selectedItem.getAttribute("value");
    206212      // if the entry is not a recipient, just continue
Note: See TracChangeset for help on using the changeset viewer.