check user is present before accessing email

This commit is contained in:
Shane Kilkelly 2016-11-28 12:01:11 +00:00
parent 52462d7020
commit d15659ed85

View file

@ -70,7 +70,7 @@
// whitelistUrls: ['example.com/scripts/']
}).install();
}
- if (typeof(user) != "undefined" && typeof (user.email) != "undefined")
- if (user && typeof(user) != "undefined" && typeof (user.email) != "undefined")
script(type="text/javascript").
if (typeof(Raven) != "undefined" && Raven.setUserContext) {
Raven.setUserContext({email: '#{user.email}'});