title: gapi.auth.authorize "Cannot read property 'authorize' of undefined"
body: <p>I'm running this code, somethimes i get an error, others i don't and i can't really understand why.</p>
  
  <pre><code>let promiseLogIn = new Promise(function(reject,resolve){
    gapi.auth.authorize(authData , function(response) {
        var authButton = document.getElementById('auth-button');
        if (response.error) {
          console.log("AuthBad");
          resolve();
          authButton.hidden = false;
        }
        else {
          console.log("AuthGood");
          reject();
          authButton.hidden = true;
        }
      });
    });
  </code></pre>
  
  <p>i load the lib in my html file like this:</p>
  
  <pre><code>&lt;script src="https://apis.google.com/js/client.js?onload=authorize"&gt;&lt;/script&gt;
  &lt;script src="sources/scripts/dist/bundle.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>where bundle.j is where i have all the compiled ts files.</p>