title: Uncaught TypeError: Cannot call method 'shift' of null for Facebook JS library in Chrome
body: <p>The below Facebook initialization code is resulting in a JS error on page load in Chrome: Uncaught TypeError: Cannot call method 'shift' of null.</p>
  
  <pre><code>  window.fbAsyncInit = function() {
      FB.init({
        appId      : '...',
        status     : true,
        xfbml      : true
      });
    };
    (function(){
      if (document.getElementById('facebook-jssdk')) {return;}
      var firstScriptElement = document.getElementsByTagName('script')[0];
      var facebookJS = document.createElement('script'); 
      facebookJS.id = 'facebook-jssdk';
      facebookJS.src = '//connect.facebook.net/en_US/all.js';
      firstScriptElement.parentNode.insertBefore(facebookJS, firstScriptElement);
    }());
  </code></pre>