From 53118984ffaf03031cbe0265674c085f65db5b31 Mon Sep 17 00:00:00 2001
From: Scott Erickson <sderickson@gmail.com>
Date: Mon, 24 Mar 2014 14:29:53 -0700
Subject: [PATCH] Undid a listenTo on a jQuery elem.

---
 app/views/play/spectate_view.coffee | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/views/play/spectate_view.coffee b/app/views/play/spectate_view.coffee
index 18821ca4f..b0a8a4379 100644
--- a/app/views/play/spectate_view.coffee
+++ b/app/views/play/spectate_view.coffee
@@ -68,7 +68,7 @@ module.exports = class SpectateLevelView extends View
   constructor: (options, @levelID) ->
     console.profile?() if PROFILE_ME
     super options
-    @listenTo($(window), 'resize', @onWindowResize)
+    $(window).on('resize', @onWindowResize)
     @listenToOnce(@supermodel, 'error', @onLevelLoadError)
 
     @sessionOne = @getQueryVariable 'session-one'
@@ -470,6 +470,7 @@ module.exports = class SpectateLevelView extends View
     @levelLoader?.destroy()
     @surface?.destroy()
     @god?.destroy()
+    $(window).off('resize', @onWindowResize)
     @goalManager?.destroy()
     @scriptManager?.destroy()
     delete window.world # not sure where this is set, but this is one way to clean it up