Simplify error handling for errors in sending sync messages from js

This commit is contained in:
Jason Grout 2015-03-25 15:18:25 +00:00
parent 18ff9c5e1c
commit 5c797f9672

View File

@ -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) {