diff --git a/jupyter_notebook/static/tree/js/notebooklist.js b/jupyter_notebook/static/tree/js/notebooklist.js index 76f239692..30743d30a 100644 --- a/jupyter_notebook/static/tree/js/notebooklist.js +++ b/jupyter_notebook/static/tree/js/notebooklist.js @@ -151,9 +151,9 @@ define([ NotebookList.prototype.handleFilesUpload = function(event, dropOrForm) { var that = this; var files; - if(dropOrForm =='drop'){ + if(dropOrForm === 'drop'){ files = event.originalEvent.dataTransfer.files; - } else + } else { files = event.originalEvent.target.files; } @@ -171,7 +171,7 @@ define([ } var item = that.new_item(0, true); item.addClass('new-file'); - that.add_name_input(f.name, item, file_ext == '.ipynb' ? 'notebook' : 'file'); + that.add_name_input(f.name, item, file_ext === '.ipynb' ? 'notebook' : 'file'); // Store the list item in the reader so we can use it later // to know which item it belongs to. $(reader).data('item', item); @@ -302,7 +302,7 @@ define([ var list_items = $('.list_item'); for (var i=0; i').text("Cancel")