From 5ed3a0ebc5fc74abcd011abc138ec1d20df25abd Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Tue, 28 Jan 2014 09:47:06 -0800 Subject: [PATCH] Simplify get_msg_cell function of notebook.js --- IPython/html/static/notebook/js/notebook.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index 1d4f6c959..08be19abe 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -308,10 +308,7 @@ var IPython = (function (IPython) { * @return {Cell} Cell or null if no cell was found. */ Notebook.prototype.get_msg_cell = function (msg_id) { - if (IPython.CodeCell.msg_cells[msg_id] !== undefined) { - return IPython.CodeCell.msg_cells[msg_id]; - } - return null; + return IPython.CodeCell.msg_cells[msg_id] || null; }; /**