LGeoJson beforeDestroy error
See original GitHub issueDescription
On destroy of parent component of LGeoJson component LGeoJson component has the following error:
vue.runtime.esm.js?2b0e:1737 TypeError: Cannot read property 'removeLayer' of undefined
at VueComponent.beforeDestroy (vue2-leaflet.min.js?458e:1)
at callHook (vue.runtime.esm.js?2b0e:2917)
at VueComponent.Vue.$destroy (vue.runtime.esm.js?2b0e:2696)
at destroy (vue.runtime.esm.js?2b0e:4174)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:5739)
at VueComponent.patch [as __patch__] (vue.runtime.esm.js?2b0e:6077)
at VueComponent.Vue.$destroy (vue.runtime.esm.js?2b0e:2719)
at destroy (vue.runtime.esm.js?2b0e:4174)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:5739)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:5744)
Component structure
-> <LGeoJson>
<PageComponent>
<LMap>
<ComponentContainingLMap>
<ProjectMainRouter>
<App>
<Root>
the error seems to be caused by the above structure as, a direct child parent relationship between LMap and LGeoJson doesn’t result in any error
Steps to Reproduce
Expected Results
No error
Actual Results
Error
Browsers Affected
- Chrome
- Firefox
- Edge
- Safari 9
- Safari 8
- IE 11
Versions
- Leaflet: - not a project dependency directly
- Vue: v2.5.17
- Vue2Leaflet: v1.0.2
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Why is beforeDestroyed function not working? - Stack Overflow
setInterval returns an interval, which is used to clear the interval, which means that you need to store the setInterval returned value into ......
Read more >Autocomplete hook beforedestroy issue. HELP - Quasar forum
I can't seem to use autocomplete in my component. I always got this error. I also made sure that it was imported already...
Read more >Vue js tutorial for beginners # 21 beforeDestroy and destroyed ...
this is vuejs tutorial we learn what is a beforeDestroy and destroyed a method in vue life cycle hooks in vue js with...
Read more >Ensure AWS API GATEWAY enables Create before Destroy
Error: AWS API Gateway does not enable Create before Destroy Bridgecrew Policy ID: BC_AWS_GENERAL_152Checkov Check ID: CKV_AWS_237Severity: LOW.
Read more >Focus management with Vue refs - Learn web development
If you open your console, you'll see an error raised along the lines ... beforeDestroy() — Runs before a component is removed from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pixelizedPeanut as I mentioned in the previous post: can you try to install vue2leaflet like this: “vue2-leaflet”: “git+https://github.com/KoRiGaN/Vue2Leaflet.git#next” and see if this resolve your issue ?
will keep an eye open 😃 Thank you