Skip to Content
Menu
This question has been flagged
1 Atsakyti
1419 Rodiniai

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
Portretas
Atmesti
Best Answer
Try to replace this line : 
            this.__edispatcherRegisteredEvents.forEach((event)=>{
with this line :
            this.__edispatcherRegisteredEvents.forEach(function(event){
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
geg. 24
3495
2
bal. 24
1225
3
kov. 24
4801
1
gruod. 24
1319
1
kov. 24
2930