aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMisko Hevery2010-07-21 13:28:14 -0700
committerMisko Hevery2010-07-21 13:28:14 -0700
commitb5bbfaeb80c3f89c65d14c72cff6f0e1c8aa497a (patch)
treece5b7ed5d15bace30a8956a935b537eafadfceaa /src
parent719f6e15a052d50f30dcecc722193804a3d5eaed (diff)
downloadangular.js-b5bbfaeb80c3f89c65d14c72cff6f0e1c8aa497a.tar.bz2
clean up error reporting
Diffstat (limited to 'src')
-rw-r--r--src/Angular.js18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 62747cf8..404d241d 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -3,8 +3,6 @@
if (typeof document.getAttribute == 'undefined')
document.getAttribute = function() {};
-if (!window['console']) window['console']={'log':noop, 'error':noop};
-
var consoleNode,
PRIORITY_FIRST = -99999,
PRIORITY_WATCH = -1000,
@@ -18,6 +16,7 @@ var consoleNode,
msie = !!/(msie) ([\w.]+)/.exec(lowercase(navigator.userAgent)),
jqLite = jQuery || jqLiteWrap,
slice = Array.prototype.slice,
+ error = window['console'] ? bind(window['console'], window['console']['error']) : noop,
angular = window['angular'] || (window['angular'] = {}),
angularTextMarkup = extensionMap(angular, 'textMarkup'),
angularAttrMarkup = extensionMap(angular, 'attrMarkup'),
@@ -174,21 +173,6 @@ function indexOf(array, obj) {
return -1;
}
-function error(a, b, c){
- var console = window['console'];
- switch(arguments.length) {
- case 1:
- console['error'](a);
- break;
- case 2:
- console['error'](a, b);
- break;
- default:
- console['error'](a, b, c);
- break;
- }
-}
-
function isLeafNode (node) {
if (node) {
switch (node.nodeName) {