谷歌浏览器弹出一个alert,内容是“typeerror:cannot read property ‘push’of undifined ”。
我知道这是错误的原因是什么,应该是这段代码。
// 当收到消息
App.chat.onReceiveMsg = function(msg) {
App.chat.chatting[msg.chatId].push(msg);
App.chat.addMsgBadge(msg.chatId);
};
但是我不清楚为什么使用alert来提醒,而且当我打开控制台的时候,这个错误并没有在控制台中输出。
所以我想找找看,是哪里捕获了这个错误。
首先我尝试看看window.onerror,但是这个属性是null,所以我想问问看,还有哪些地方可能捕获了这个错误?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
全部代码搜索
alert,onpossiblyunhandledexception,unhandledrejection如果能调试的话下断定应该能找着alert是哪里弹出来的。