From 672f5fc72c051f4c373722d2519ac1b1db2c2187 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Tue, 7 Apr 2015 20:49:35 +0000 Subject: [PATCH 1/2] minor fixes on custom serialization, and traitlet hold_traits --- IPython/html/static/widgets/js/widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 5ad4ef5b3..6c39878d1 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -369,7 +369,7 @@ define(["widgets/js/manager", // being the value or the promise of the serialized value var serializers = this.constructor.serializers; if (serializers) { - for (k in attrs) { + for (var k in attrs) { if (serializers[k] && serializers[k].serialize) { attrs[k] = (serializers[k].serialize)(attrs[k], this); } From 6c4cd1c1be8bf32546e286c4dfbc83e31d31ecbe Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Tue, 7 Apr 2015 22:09:56 +0000 Subject: [PATCH 2/2] Check for null value --- IPython/html/static/widgets/js/widget.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 6c39878d1..c5696baed 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -355,7 +355,7 @@ define(["widgets/js/manager", this.pending_msgs++; } } - // Since the comm is a one-way communication, assume the message + // Since the comm is a one-way communication, assume the message // arrived. Don't call success since we don't have a model back from the server // this means we miss out on the 'sync' event. this._buffered_state_diff = {}; @@ -383,11 +383,13 @@ define(["widgets/js/manager", for (var i=0; i