diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index fdd99e4..8a689fe 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -396,11 +396,10 @@ define(["widgets/js/manager", } } that.comm.send({method: 'backbone', sync_data: state, buffer_keys: buffer_keys}, callbacks, {}, buffers); - }).catch(utils.reject("Couldn't send widget sync message", true)) - .catch(function(error) { - that.pending_msgs--; - return error; - }); + }).catch(function(error) { + that.pending_msgs--; + return (utils.reject("Couldn't send widget sync message", true))(error); + }); }, serialize: function(model, attrs) {