Skip to content

Commit 3568eca

Browse files
committed
Fix env-js node 0.4.2 incompatibility.
The `console` global is read-only; it cannot be reassigned.
1 parent 1fe1b46 commit 3568eca

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/env-js/envjs/platform/core.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ var log = {
4242
exception: function(){return this;}
4343
};
4444

45-
try{
46-
console = console;
47-
}catch(e){
45+
if (typeof console == "undefined") {
4846
console = require('envjs/console').console;
4947
}
5048

0 commit comments

Comments
 (0)