try to unsubscribe from the log when the log view is destroyed, too

This commit is contained in:
Sven Fuchs 2013-03-07 16:43:00 +01:00
parent 8ceff1fb7e
commit ffd1b6d917

View File

@ -1,6 +1,6 @@
require 'log'
Log.DEBUG = false
Log.DEBUG = true
Travis.reopen
LogView: Travis.View.extend
@ -8,6 +8,10 @@ Travis.reopen
logBinding: 'job.log'
contextBinding: 'job'
willDestroyElement: ->
job = @get('job')
job.unsubscribe() if job
toTop: () ->
$(window).scrollTop(0)