mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Use _.isObject instead of typeof.
This commit is contained in:
@@ -461,7 +461,9 @@
|
||||
model.attributes = attributes;
|
||||
var serverAttrs = model.parse(resp, options);
|
||||
if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);
|
||||
if (typeof serverAttrs === 'object' && !model.set(serverAttrs, options)) return false;
|
||||
if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {
|
||||
return false;
|
||||
}
|
||||
if (success) success(model, resp, options);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user