From f11fbe8844b493d427ba7ab579ec3617c74e09ef Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 26 Jan 2015 11:22:22 -0800 Subject: [PATCH] add missing `that = this` --- IPython/html/static/tree/js/notebooklist.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index e98415fdd..de0238157 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -597,12 +597,13 @@ define([ /** * Remove the deleted notebook. */ + var that = this; $( ":data(path)" ).each(function() { var element = $(this); - if (element.data("path") == path) { + if (element.data("path") === path) { element.remove(); events.trigger('notebook_deleted.NotebookList'); - this._selection_changed(); + that._selection_changed(); } }); };