Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1421 Zobrazení

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
Zrušit
Nejlepší odpověď
Try to replace this line : 
            this.__edispatcherRegisteredEvents.forEach((event)=>{
with this line :
            this.__edispatcherRegisteredEvents.forEach(function(event){
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
kvě 24
3498
2
dub 24
1225
3
bře 24
4807
1
pro 24
1320
1
bře 24
2933