title: Foundation 5 Upgrade: "Layer must be a document node"
body: <p>I'm trying to upgrade my Ruby on Rails app from Foundation 4 to the newly-released Foundation 5, and the CSS switch is going relatively smoothly. However, I'm running into a problem switching the Javascript files.</p>
  
  <p>When I switch out the Foundation 4 versions of the foundation.min.js and modernizr.js files and then reload a page, I get this weird JS error in the console:</p>
  
  <pre><code>Uncaught TypeError: Layer must be a document node foundation.js?body=1:35
    FastClick foundation.js?body=1:35
    FastClick.attach foundation.js?body=1:35
    (anonymous function) foundation.js?body=1:40
    (anonymous function)
  </code></pre>
  
  <p>I don't even know what FastClick does, but it appears to be included in Foundation 5 and it's stopping Foundation from loading. That, in turn, is causing all of my Foundation-dependent JS to fail as well.</p>
  
  <p>Any help would be appreciated, thank you!</p>