Fail over to console.log if lacking console method
This improves logger resiliency under older browsers.
This commit is contained in:
+5
-1
@@ -276,7 +276,7 @@ describe('builtin helpers', function() {
|
||||
equals(3, levelArg);
|
||||
equals("whee", logArg);
|
||||
});
|
||||
it('should not output to info', function() {
|
||||
it('should output to info', function() {
|
||||
var string = "{{log blah}}";
|
||||
var hash = { blah: "whee" };
|
||||
|
||||
@@ -284,6 +284,10 @@ describe('builtin helpers', function() {
|
||||
equals("whee", log);
|
||||
called = true;
|
||||
};
|
||||
console.log = function(log) {
|
||||
equals("whee", log);
|
||||
called = true;
|
||||
};
|
||||
|
||||
shouldCompileTo(string, hash, "");
|
||||
equals(true, called);
|
||||
|
||||
Reference in New Issue
Block a user