Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1426 Widoki

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
Awatar
Odrzuć
Najlepsza odpowiedź
Try to replace this line : 
            this.__edispatcherRegisteredEvents.forEach((event)=>{
with this line :
            this.__edispatcherRegisteredEvents.forEach(function(event){
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
maj 24
3503
2
kwi 24
1226
3
mar 24
4819
1
gru 24
1321
1
mar 24
2935