Uncaught TypeError: Cannot read property 'call' of undefined at __webpack_require__

前端 未结 2 1236
孤独总比滥情好
孤独总比滥情好 2021-01-05 01:02

I am using React.lazy to load some React classes on runtime so that they are not all loaded at once. My code works for production, but crashes when I am in development mode.

2条回答
  •  庸人自扰
    2021-01-05 01:56

    I was able to fix this by changing

    map.on('moveend', update());
    

    to

    map.on('moveend', function () {
        update();
    });
    

提交回复
热议问题