Undefined error in plupload dispatchEvent on Mac Safari

▼魔方 西西 提交于 2019-12-06 11:29:34

问题


I am experiencing weird errors on Mac Safari with plupload.js. The method dispatchEvent has this line:

evt.type = eventType;

It sometimes throws this error:

TypeError: undefined is not an object (evaluating 'evt.type = eventType')" userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12

The evt object is declared at the top of the method:

var evt = {};

It is not re-declared anywhere below. I am not able to reproduce this error locally, I have it in my logs from other users. How can this happen? Might it be a problem with JS implementation on Mac Safari so that some other thread is erasing the evt object?

EDIT: The problematic line of code is here https://github.com/moxiecode/plupload/blob/3.x/js/plupload.js#L2200

来源:https://stackoverflow.com/questions/41719570/undefined-error-in-plupload-dispatchevent-on-mac-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!