Skip to content

Commit

Permalink
change .apply() to .call() for window.onerror
Browse files Browse the repository at this point in the history
Maizify committed Sep 12, 2016
1 parent 41c1fea commit e45600b
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dist/vconsole.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vconsole",
"version": "2.4.0",
"version": "2.4.1-pre",
"description": "A lightweight, extendable front-end developer tool for mobile web page.",
"homepage": "https://github.com/WechatFE/vConsole",
"main": "dist/vconsole.min.js",
2 changes: 1 addition & 1 deletion src/log/default.js
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ class VConsoleDefaultTab extends VConsoleLogTab {
}
that.printLog({logType:'error', logs:[msg], noOrigin:true});
if (tool.isFunction(that.windowOnError)) {
that.windowOnError.apply(window, message, source, lineNo, colNo, error);
that.windowOnError.call(window, message, source, lineNo, colNo, error);
}
};
}

0 comments on commit e45600b

Please sign in to comment.