##// END OF EJS Templates
Prefer JQuery to Underscore
Jonathan Frederic -
Show More
@@ -156,7 +156,7 function(WidgetManager, Underscore, Backbone){
156 }
156 }
157
157
158 // Only sync if there are attributes to send to the back-end.
158 // Only sync if there are attributes to send to the back-end.
159 if (_.size(attrs) !== 0) {
159 if (attr.length > 0) {
160 var callbacks = options.callbacks || {};
160 var callbacks = options.callbacks || {};
161 if (this.pending_msgs >= this.msg_throttle) {
161 if (this.pending_msgs >= this.msg_throttle) {
162 // The throttle has been exceeded, buffer the current msg so
162 // The throttle has been exceeded, buffer the current msg so
@@ -166,7 +166,7 function(WidgetManager, Underscore, Backbone){
166 // Combine updates if it is a 'patch' sync, otherwise replace updates
166 // Combine updates if it is a 'patch' sync, otherwise replace updates
167 switch (method) {
167 switch (method) {
168 case 'patch':
168 case 'patch':
169 this.msg_buffer = _.extend(this.msg_buffer || {}, attrs);
169 this.msg_buffer = $.extend(this.msg_buffer || {}, attrs);
170 break;
170 break;
171 case 'update':
171 case 'update':
172 case 'create':
172 case 'create':
General Comments 0
You need to be logged in to leave comments. Login now