From 3f180fec27e38bc9921f4ba8a5cbca24e8515ae5 Mon Sep 17 00:00:00 2001 From: Gregg Zigler Date: Tue, 19 Aug 2014 14:41:55 -0700 Subject: [PATCH] do not try to vibrate in travis --- js/services/notifications.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/services/notifications.js b/js/services/notifications.js index 908ae74b7..ba8cb49f9 100644 --- a/js/services/notifications.js +++ b/js/services/notifications.js @@ -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'}); }