Skip to content

Commit

Permalink
Fix setupConsole
Browse files Browse the repository at this point in the history
  • Loading branch information
drichard committed Jun 24, 2012
1 parent 69438dc commit c785ca2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/js/MindMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,9 @@ function setupConsole() {

// provide console object and dummy functions if not built-in
var console = window.console || {};
console.log = console.log || noOp;
console.info = console.info || noOp;
console.debug = console.debug || noOp;
console.warn = console.warn || noOp;
console.error = console.error || noOp;
['log', 'info', 'debug', 'warn', 'error'].forEach(function(prop) {
console[prop] = console[prop] || noOp;
});

// turn all console.xx calls into no-ops when in production mode except
// for errors, do an alert.
Expand All @@ -148,6 +146,7 @@ function setupConsole() {
window.alert("Error: " + s);
};
}

window.console = console;
}

Expand Down

0 comments on commit c785ca2

Please sign in to comment.