From 7999edb5b8e12e5cd160cc75ebbeefe44e9671a3 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Tue, 25 Aug 2015 22:36:05 -0700 Subject: [PATCH] Added check for index on merge_above to resolve #330 --- notebook/static/notebook/js/notebook.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index 9a84ade3c..dc39537a9 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -1496,7 +1496,9 @@ define(function (require) { */ Notebook.prototype.merge_cell_above = function () { var index = this.get_selected_index(); - this.merge_cells([index-1, index], true) + if (index != 0) { + this.merge_cells([index-1, index], true) + } }; /**