From bf8f944ab1f4c39af687de1a487ffbec434d1b2b Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Fri, 6 Sep 2013 16:11:03 +0200 Subject: [PATCH] fix ignoreWarning --- assets/scripts/app/pusher.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/scripts/app/pusher.coffee b/assets/scripts/app/pusher.coffee index a18f27bd..d12d2153 100644 --- a/assets/scripts/app/pusher.coffee +++ b/assets/scripts/app/pusher.coffee @@ -85,5 +85,9 @@ $.extend Travis.Pusher.prototype, when 'annotation:created', 'annotation:updated' { annotation: data } - warn: (type, warning) -> - console.warn(warning) + warn: (type, object) -> + console.warn(type, object.error) unless @ignoreWarning(type, object.error) + + ignoreWarning: (type, error) -> + if message = error?.data?.message + message.indexOf('Existing subscription') == 0 or message.indexOf('No current subscription') == 0