We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aaafab commit 7826683Copy full SHA for 7826683
1 file changed
packages/kitsu-core/src/serialise/index.js
@@ -24,7 +24,7 @@ function isValid (isArray, type, payload, method) {
24
}
25
26
} else {
27
- if (payload?.constructor !== Object || Object.keys(payload).length === 0) {
+ if (typeof payload !== 'object' || Object.keys(payload).length === 0) {
28
throw new Error(`${method} requires an object or array body`)
29
30
// A POST request is the only request to not require an ID in spec
0 commit comments