Permalink
Browse files

Only log exceptions to console if console is defined.

  • Loading branch information...
1 parent 7627161 commit 93cd7d6bd84149cea17a071493bd30628f766e2f @CodeMonkeySteve CodeMonkeySteve committed Feb 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/haml.js
View
@@ -633,7 +633,7 @@ var Haml;
var f = new Function("locals", escaper + str );
return f;
}catch(e){
- console.error(str);
+ if ( typeof(console) !== 'undefined' ) { console.error(str); }
throw e;
}
}

0 comments on commit 93cd7d6

Please sign in to comment.