Skip to Content
Menú
This question has been flagged
1 Respondre
1873 Vistes

i am getting an error while trying to open the editor,

web.assets_frontend_lazy.min.js:3433 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
destroy: function() {
            var self = this;
            this.__edispatcherRegisteredEvents.forEach((event)=>{

^ thats the error part. 

My js code structure , 

import publicWidget from "@web/legacy/js/public/public_widget"
publicWidget.registry.DynamicProdImage = publicWidget.Widget.extend
init, start, destroy
export default publicWidget.registry.DynamicProdImage
Avatar
Descartar
Best Answer
Try to replace this line : 
            this.__edispatcherRegisteredEvents.forEach((event)=>{
with this line :
            this.__edispatcherRegisteredEvents.forEach(function(event){
Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de maig 24
4266
2
d’abr. 24
1833
3
de març 24
5478
2
de jul. 25
2245
1
de març 24
3244