Fail over to console.log if lacking console method

This improves logger resiliency under older browsers.
This commit is contained in:
kpdecker
2015-02-07 13:22:31 -06:00
parent 95421271e3
commit cfbef2585d
2 changed files with 7 additions and 5 deletions
+5 -1
View File
@@ -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);