Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
1874 Tampilan

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
Buang
Jawaban Terbai
Try to replace this line : 
            this.__edispatcherRegisteredEvents.forEach((event)=>{
with this line :
            this.__edispatcherRegisteredEvents.forEach(function(event){
Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mei 24
4266
2
Apr 24
1833
3
Mar 24
5478
2
Jul 25
2246
1
Mar 24
3245