Skip to content

Commit 7826683

Browse files
authored
fix(kitsu-core): allow longer prototype chain on serialise (#447)
1 parent 9aaafab commit 7826683

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/kitsu-core/src/serialise

packages/kitsu-core/src/serialise/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function isValid (isArray, type, payload, method) {
2424
}
2525
}
2626
} else {
27-
if (payload?.constructor !== Object || Object.keys(payload).length === 0) {
27+
if (typeof payload !== 'object' || Object.keys(payload).length === 0) {
2828
throw new Error(`${method} requires an object or array body`)
2929
}
3030
// A POST request is the only request to not require an ID in spec

0 commit comments

Comments
 (0)