title: tabs.getCurrent() result is undefined?
body: <p>Not sure why I cannot retrieve info about current tab using getCurrent() when I navigate to, say, amazon.com or google.com and hit the browser icon for a browser action. Any hints on what I am missing?</p>
  
  <p>MANIFEST:</p>
  
  <pre><code>{
    "name": "testGetCurrentTab",
    "version":  "1.0",
    "description":  "",
    "manifest_version": 2,
  
    "icons": {
      "48": "icons/icon-48.png"
    },
  
    "permissions": [
        "tabs",
        "&lt;all_urls&gt;"
    ],
  
    "browser_action": {
        "default_icon": "icon/icon-32.png"
    },
  
    "background": {
        "scripts": ["background.js"]
    }      
  }
  </code></pre>
  
  <p>BACKGROUND: </p>
  
  <pre><code>function displayInfo() {
  
    function onGot(tabInfo) {
      console.log('Inside onGot() ...');
      console.log(tabInfo);
    }
  
    function onError(error) {
      console.log(`Error: ${error}`);
    }
  
    var gettingCurrent = browser.tabs.getCurrent();
    gettingCurrent.then(onGot, onError);
  }
  
  browser.browserAction.onClicked.addListener(displayInfo);
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>Inside onGot() ...  background.js:4:7
  
  undefined  background.js:5:7
  </code></pre>
  
  <p>Firefox Dev Edition 54  (64bit)</p>
  
  <p><a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/getCurrent" rel="noreferrer">https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/getCurrent</a></p>