Skip to content

Commit b1ea326

Browse files
author
minjk-bl
committed
Handle signature comment bug
1 parent 86e5d1b commit b1ea326

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/com/com_interface.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ define([
2929
var targetCell = Jupyter.notebook.insert_cell_below(type, selectedIndex);
3030

3131
// Add signature
32-
if (type == 'code' && sigNum >= 0) {
33-
command = com_util.formatString('# VisualPython [{0}]\n', sigNum) + command
32+
if (type == 'code') {
33+
if (sigNum >= 0) {
34+
command = com_util.formatString('# VisualPython [{0}]\n', sigNum) + command;
35+
} else {
36+
command = '# VisualPython\n' + command;
37+
}
3438
}
3539
targetCell.set_text(command);
3640
Jupyter.notebook.select_next();

0 commit comments

Comments
 (0)