lib/speed_gun/app/public/browser.js in speed_gun-0.0.3 vs lib/speed_gun/app/public/browser.js in speed_gun-0.0.4
- old
+ new
@@ -5,9 +5,13 @@
speedGun.sendBrowserInfo = function() {
var data = {};
var p = window['performance'];
+ if(!p) {
+ return;
+ }
+
data.user_agent = navigator.userAgent;
if(p['navigation']) {
data.navigation = {
type: p.navigation.type,