diff --git a/app/assets/javascripts/app/controllers/widget/online_notification.coffee b/app/assets/javascripts/app/controllers/widget/online_notification.coffee index 2ac77e3b3..b2bf94ccd 100644 --- a/app/assets/javascripts/app/controllers/widget/online_notification.coffee +++ b/app/assets/javascripts/app/controllers/widget/online_notification.coffee @@ -38,7 +38,7 @@ class App.OnlineNotificationWidget extends App.Controller @createContainer() @subscribeId = App.OnlineNotification.subscribe( @updateContent ) - release: => + release: -> @removeContainer() $(window).off 'click.notifications' App.OnlineNotification.unsubscribe( @subscribeId ) diff --git a/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee b/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee index 9b0f74306..2570dad15 100644 --- a/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee +++ b/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee @@ -25,7 +25,7 @@ class App.UserOrganizationAutocompletion extends App.Controller element: => @el - release: => + release: -> $(window).off 'click.UserOrganizationAutocompletion' open: =>