do not try to vibrate in travis

This commit is contained in:
Gregg Zigler 2014-08-19 14:41:55 -07:00
parent 55e98ef508
commit 3f180fec27
1 changed files with 5 additions and 2 deletions

View File

@ -200,8 +200,11 @@ factory('notification', ['$timeout',
}, settings[type].duration);
}
// Movile notification
window.navigator.vibrate([200,100,200]);
// Mobile notification
if (window && window.navigator && window.navigator.vibrate) {
window.navigator.vibrate([200,100,200]);
};
if (document.hidden && (type == 'info' || type == 'funds')) {
new window.Notification(title, {body: content, icon:'img/notification.png'});
}