Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/hyperagent.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ define("hyperagent/properties",
// one large object for defineProperties first and call on that in the end
// and if that would make the code cleaner.
options = options || {};
if (Object(response) !== response) {
throw new Error('The Properties argument must be an object.');
if (!response) {
response = {};
}
// Overwrite the response object with the original properties if provided.
config._.defaults(response, options.original || {});
Expand Down Expand Up @@ -688,4 +688,4 @@ define("hyperagent/resource",
__exports__.LinkResource = LinkResource;
});
window.Hyperagent = requireModule('hyperagent');
}());
}());
4 changes: 2 additions & 2 deletions lib/hyperagent/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export function Properties(response, options) {
// one large object for defineProperties first and call on that in the end
// and if that would make the code cleaner.
options = options || {};
if (Object(response) !== response) {
throw new Error('The Properties argument must be an object.');
if (!response) {
response = {};
}
// Overwrite the response object with the original properties if provided.
config._.defaults(response, options.original || {});
Expand Down