From 0d9eb49963b07930b3d03a7ef9cb6219a1c0994a 2014-12-09 22:48:21 From: Jason Grout Date: 2014-12-09 22:48:21 Subject: [PATCH] Fix a bug in using promises with comms: this -> that --- diff --git a/IPython/html/static/services/kernels/comm.js b/IPython/html/static/services/kernels/comm.js index 4af2ba6..cffd66f 100644 --- a/IPython/html/static/services/kernels/comm.js +++ b/IPython/html/static/services/kernels/comm.js @@ -106,9 +106,9 @@ define([ console.error('Comm promise not found for comm id ' + content.comm_id); return; } - + var that = this; this.comms[content.comm_id] = this.comms[content.comm_id].then(function(comm) { - this.unregister_comm(comm); + that.unregister_comm(comm); try { comm.handle_close(msg); } catch (e) {