ajbrown / angular-loggly-logger

An AngularJS module which sends your $log message to loggly, and provides a service for manually sending messages to loggly.
MIT License
32 stars 49 forks source link

$log.log undefined throws error #19

Closed davidcai closed 9 years ago

davidcai commented 9 years ago

I would expect the following code to log "undefined" in console:

var a; $log.log(a);

However, I got "TypeError: Cannot read property 'stack' of undefined" error. And because of this error, some JS code couldn't complete running, which caused an error state in my app.

Line 207: if(angular.isDefined(msg.stack)){ ... might also need to check if msg is undefined?

Thanks.

ajbrown commented 9 years ago

THanks @davidcai. I'll push an update for this shortly.