vue-foundation / vue-foundation

VueJS + Foundation + Vue-Router + Webpack
https://vue-foundation.github.io/vue-foundation
215 stars 38 forks source link

Foundation Magellan JavaScript Issue #16

Closed grantcarthew closed 7 years ago

grantcarthew commented 7 years ago

Whilst converting the Vue components to remove the foundation.js mixin I have found a bug in the Foundation Magellan component.

Currently on branch FoundationJS, if you navigate to the Magellan component then away to any other component twice the following error appears in the console:


foundation.js?c8d3:5304 Uncaught TypeError: Cannot read property 'deepLinking' of null
    at eval (eval at <anonymous> (app.js:992), <anonymous>:5304:28)
    at dispatch (eval at <anonymous> (app.js:1028), <anonymous>:5206:27)
    at elemData.handle (eval at <anonymous> (app.js:1028), <anonymous>:5014:28)
    at pushHash (eval at <anonymous> (app.js:1285), <anonymous>:2191:24)
    at eval (eval at <anonymous> (app.js:1285), <anonymous>:2133:7)
    at eval (eval at <anonymous> (app.js:1285), <anonymous>:1668:19)
    at eval (eval at <anonymous> (app.js:1285), <anonymous>:1776:7)
    at step (eval at <anonymous> (app.js:1285), <anonymous>:1615:7)
    at step (eval at <anonymous> (app.js:1285), <anonymous>:1622:9)
    at runQueue (eval at <anonymous> (app.js:1285), <anonymous>:1626:3)

After searching the Zurb Foundation-Sites repository I found the only reference to the deepLinking text is in the Magellan component.

If I remove the destroy() call on the Magellan component destroyed() hook the error does not show up.

It has something to do with the cleaning up of the Foundation JavaScript for the Magellan js.

grantcarthew commented 7 years ago

I upgraded the dependency packages and tested the error again. Still exists. I decided to open an issue on the Zurb Foundation repository:

https://github.com/zurb/foundation-sites/issues/10020

grantcarthew commented 7 years ago

This issue has been fixed. Published in the next foundation-sites release most likely. https://github.com/zurb/foundation-sites/pull/10050

grantcarthew commented 7 years ago

Closing due to Foundation 6.4 upgrade and v2.0.