Set default metadata for javascript callback

This commit is contained in:
Jason Grout 2012-07-07 11:38:08 -05:00 committed by MinRK
parent 9436f33035
commit 4ad79b41f6

View File

@ -351,7 +351,7 @@ var IPython = (function (IPython) {
var reply = $.parseJSON(e.data);
var content = reply.content;
var msg_type = reply.header.msg_type;
var metadata = reply.metadata;
var metadata = reply.metadata || {};
var callbacks = this.get_callbacks_for_msg(reply.parent_header.msg_id);
if (msg_type !== 'status' && callbacks === undefined) {
// Message not from one of this notebook's cells and there are no