From b839870aad0fbaa0f6b316a601bd25ec1038e3f2 2014-10-08 18:30:32 From: Jessica B. Hamrick Date: 2014-10-08 18:30:32 Subject: [PATCH] Fix equals sign and clarify where the number of restart attempts comes from --- diff --git a/IPython/html/static/notebook/js/notificationarea.js b/IPython/html/static/notebook/js/notificationarea.js index 4608436..188144e 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');