title: Promise.then() doesn't work on first button click
body: <p>The problem I have is that when I click on the "NewQuoteButton" on the FIRST time the page loads, I get an error: <code>quoteGenerator.getQuote(...).then is not a function</code>. However, if I click the button again, I'm able to generate the quotes normally. Also upon examining my network tab in Chrome inspector, I noticed I had a lot more get requests and responses from the API while my quote that is being displayed is lagging behind. </p>
  
  <p>I'm new to Promises and currently practicing utilizing it along with revealing module pattern. My understanding is that a Promise calls then() which takes a function with that resolved promise's value as the argument. Therefore, my getQuote() should work because it returns a Promise containing a quote object. Can someone point me in the right direction. Thanks!</p>
  
  <pre><code>const quoteGenerator = (function(){
    let url = "https://andruxnet-random-famous-quotes.p.mashape.com/?cat=famous";
    let apiHeader = new Headers({
      "X-Mashape-Key": "..."
    });
    let init = {
      headers : apiHeader,
    }
    let quoteInfo = {};
  
    let getQuote = function(){
      fetch(url, init)
        .then(response =&gt; {
          if (response.ok){
            return response.json();
          }
          throw new Error("Get request failed");
          }, networkError =&gt; console.log("Error: " + networkError))
        .then(jsonResponse =&gt; {
          quoteInfo = Promise.resolve({
            quote: jsonResponse.quote,
            author: jsonResponse.author
          }); 
         });
        return quoteInfo;   
    };
  
  
    return {
      getQuote : getQuote
    };
  
  })();
  
  //Triggers when user clicks on social media button to share quote.
  //Checks to see if quote has been generated from quoteGenerator before
  //sharing it, if not, then button does nothing.
  
  const clickHandler = (function(){
    let triggerClicked = function(){
      $("#twitter").on("click", function(e){
        e.preventDefault();
        window.open("https://twitter.com/intent/tweet?text=asdf");
      });
  
      $("#newQuoteButton").on("click", function(e){
          //ERROR BELOW//
          quoteGenerator.getQuote().then(function(quoteInfo){
          //ERROR ABOVE//
          $("#quoteSection &gt; h2").html("&lt;i class='fa fa-quote-left'&gt;&lt;/i&gt;" + 
                                       quoteInfo.quote + "&lt;i class='fa fa-quote-right'&gt;&lt;/i&gt;");
          $("#author").html("&lt;i&gt;- " + quoteInfo.author + "&lt;/i&gt;");
        }).catch(function(e){
          console.log(e);
        });
      });
    };
    return {
      handleClicks: triggerClicked
    }
  })();
  
  clickHandler.handleClicks();
  </code></pre>