Skip to content

Commit

Permalink
Fix IPython object references
Browse files Browse the repository at this point in the history
Ref jupyter#141

(c) Copyright IBM Corp. 2016
  • Loading branch information
jhpedemonte committed Mar 7, 2016
1 parent fb2a665 commit 0a9216c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions elements/urth-core-behaviors/execution-complete-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
console.debug("Registering _onExecutionComplete for Execute Reply messages.");
this.__replyCallback = this._onExecutionComplete.bind(this);

IPython.notebook.kernel.widget_manager.notebook.events.on(
IPython.notebook.events.on(
'shell_reply.Kernel', this.__replyCallback
);
},

detached: function() {
console.debug("Unregistering _onExecutionComplete for Execute Reply messages.");
if (this.__replyCallback){
IPython.notebook.kernel.widget_manager.notebook.events.off(
IPython.notebook.events.off(
'shell_reply.Kernel', this.__replyCallback
);
}
Expand Down
2 changes: 1 addition & 1 deletion elements/urth-core-behaviors/jupyter-kernel-observer.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'kernel_ready.Kernel', this.__kernelReadyCallback
);

if( IPython.notebook.kernel.is_connected() ){
if( IPython.notebook.kernel && IPython.notebook.kernel.is_connected() ){
this.onKernelReady();
}
},
Expand Down

0 comments on commit 0a9216c

Please sign in to comment.