title: Null is not an object (evaluating 'e.length')
body: <p>So I am getting this error on my wordpress site and can't work out what's causing it. I have attached a screenshot of what shows up when the error is expanded though my gut feeling is that it's got something to do with how the jQuery is loaded.</p>
  
  <p>If anyone can give me any pointers or things to check - that'd be great.
  <a href="https://i.stack.imgur.com/pTGad.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pTGad.png" alt="enter image description here"></a></p>
  
  <p>Code in script.js:17</p>
  
  <pre><code>jQuery(document).ready(function($) {
      // set the container that Masonry will be inside of in a var
      var container = document.querySelector('#masonry');
  
      // create empty var msnry
      var msnry;
  
      // initialize Masonry after all images have loaded
      imagesLoaded( container, function() {
          msnry = new Masonry( container, {
              itemSelector: '.masonry-item'
          });
      });
  });
  </code></pre>