Skip to content

Commit e6e0585

Browse files
authored
Update notebook.js (#5733)
1 parent 5af2343 commit e6e0585

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

notebook/static/notebook/js/notebook.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,6 +2920,14 @@ define([
29202920
click: function() {
29212921
var nb_path = d.find('input').val();
29222922
var nb_name = nb_path.split('/').slice(-1).pop();
2923+
if (!nb_name) {
2924+
$(".save-message").html(
2925+
$("<span>")
2926+
.attr("style", "color:red;")
2927+
.text($(".save-message").text())
2928+
);
2929+
return false;
2930+
}
29232931
// If notebook name does not contain extension '.ipynb' add it
29242932
var ext = utils.splitext(nb_name)[1];
29252933
if (ext === '') {

0 commit comments

Comments
 (0)