Bug 1544274 - Add missing return statement for the case where address book import's file picker gets canceled. r=aceman
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 14 Apr 2019 13:12:21 +0200
changeset 26339 d95e0ca4fedd04f85b5490be29ecaa25fd0eff1a
parent 26338 552dd1355efae3044c6008fcea598ff23f459f0b
child 26340 8b4cb5e5adc01a897ac9078087d1a654fb91d872
push id15793
push usermozilla@jorgk.com
push dateSun, 14 Apr 2019 21:52:15 +0000
treeherdercomm-central@4f2702e359aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman
bugs1544274
Bug 1544274 - Add missing return statement for the case where address book import's file picker gets canceled. r=aceman
mailnews/import/content/importDialog.js
--- a/mailnews/import/content/importDialog.js
+++ b/mailnews/import/content/importDialog.js
@@ -604,16 +604,17 @@ function attachStrings(aNode, aString)
  * Show the file picker.
  * @return {Promise} the selected file, or null
  */
 function promptForFile(fp) {
   return new Promise(resolve => {
     fp.open(rv => {
       if (rv != Ci.nsIFilePicker.returnOK || !fp.file) {
         resolve(null);
+        return;
       }
       resolve(fp.file);
     });
   });
 }
 
 /*
   Import Settings from a specific module, returns false if it failed