-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console plugin: Object doesn't support property or method 'apply' #217
Comments
Is this just suggesting that I need to do:
instead? |
diff --git a/plugins/console.js b/plugins/console.js
index aac3e3e..a3cba91 100644
--- a/plugins/console.js
+++ b/plugins/console.js
@@ -19,7 +19,9 @@ var logForGivenLevel = function(level) {
// this fails for some browsers. :(
if (originalConsoleLevel) {
- originalConsoleLevel.apply(originalConsole, args);
+ Function.prototype.bind
+ .call(originalConsoleLevel, originalConsole)
+ .apply(originalConsole, args);
}
};
}; |
Yes, I did try it and it worked, but I'm not 100% sure of the concequences in other browsers |
It works in Chrome, so that's good enough for me! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The console plugin errors in IE9 with
Object doesn't support property or method 'apply'
(example). Thoughts on using this to fix it?The text was updated successfully, but these errors were encountered: