From 205a35ceec2de3d9ab466b4fa7980f8a52f89c65 Mon Sep 17 00:00:00 2001 From: "Jessica B. Hamrick" Date: Mon, 6 Oct 2014 10:21:33 -0700 Subject: [PATCH] Fix equals sign and clarify where the number of restart attempts comes from --- IPython/html/static/notebook/js/notificationarea.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/notebook/js/notificationarea.js b/IPython/html/static/notebook/js/notificationarea.js index 460843647..188144e0d 100644 --- a/IPython/html/static/notebook/js/notificationarea.js +++ b/IPython/html/static/notebook/js/notificationarea.js @@ -142,8 +142,13 @@ define([ }); this.events.on('status_autorestarting.Kernel', function (evt, info) { - // only show the dialog on the first restart attempt - if (info.attempt == 1) { + // Only show the dialog on the first restart attempt. This + // number gets tracked by the `Kernel` object and passed + // along here, because we don't want to show the user 5 + // dialogs saying the same thing (which is the number of + // times it tries restarting). + if (info.attempt === 1) { + // hide existing modal dialog $(".modal").modal('hide');