File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,8 @@ export class JupyterActions extends JupyterActions0 {
169
169
if ( this . store . get ( "read_only" ) ) return ;
170
170
const cell = this . store . getIn ( [ "cells" , id ] ) ;
171
171
if ( cell == null ) {
172
- throw Error ( `can't run cell ${ id } since it does not exist` ) ;
172
+ // it is trivial to run a cell that does not exist -- nothing needs to be done.
173
+ return ;
173
174
}
174
175
175
176
const cell_type = cell . get ( "cell_type" , "code" ) ;
Original file line number Diff line number Diff line change @@ -1105,7 +1105,8 @@ export abstract class JupyterActions extends Actions<JupyterStoreState> {
1105
1105
) : void {
1106
1106
const cell = this . store . getIn ( [ "cells" , id ] ) ;
1107
1107
if ( cell == null ) {
1108
- throw Error ( `can't run cell ${ id } since it does not exist` ) ;
1108
+ // it is trivial to run a cell that does not exist -- nothing needs to be done.
1109
+ return ;
1109
1110
}
1110
1111
const kernel = this . store . get ( "kernel" ) ;
1111
1112
if ( kernel == null || kernel === "" ) {
Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ export class JupyterActions extends JupyterActions0 {
58
58
if ( this . store . get ( "read_only" ) ) return ;
59
59
const cell = this . store . getIn ( [ "cells" , id ] ) ;
60
60
if ( cell == null ) {
61
- throw Error ( `can't run cell ${ id } since it does not exist` ) ;
61
+ // it is trivial to run a cell that does not exist -- nothing needs to be done.
62
+ return ;
62
63
}
63
64
const cell_type = cell . get ( "cell_type" , "code" ) ;
64
65
if ( cell_type == "code" ) {
@@ -669,9 +670,8 @@ export class JupyterActions extends JupyterActions0 {
669
670
// we are done waiting for output from this cell.
670
671
// The output handler removes all listeners whenever it is
671
672
// finished, so we don't have to remove this listener for done.
672
- handler . once (
673
- "done" ,
674
- ( ) => this . jupyter_kernel ?. removeListener ( "closed" , handleKernelClose ) ,
673
+ handler . once ( "done" , ( ) =>
674
+ this . jupyter_kernel ?. removeListener ( "closed" , handleKernelClose ) ,
675
675
) ;
676
676
677
677
handler . on ( "more_output" , ( mesg , mesg_length ) => {
You can’t perform that action at this time.
0 commit comments