From e3d05ab0e736a570c2787768099abb044ca101d6 2015-03-25 15:18:25 From: Jason Grout Date: 2015-03-25 15:18:25 Subject: [PATCH] Simplify error handling for errors in sending sync messages from js --- 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) {