diff --git a/packages/kitsu-core/src/serialise/index.js b/packages/kitsu-core/src/serialise/index.js index 9bc9c058..a3b81a9f 100644 --- a/packages/kitsu-core/src/serialise/index.js +++ b/packages/kitsu-core/src/serialise/index.js @@ -24,7 +24,7 @@ function isValid (isArray, type, payload, method) { } } } else { - if (payload?.constructor !== Object || Object.keys(payload).length === 0) { + if (typeof payload !== 'object' || Object.keys(payload).length === 0) { throw new Error(`${method} requires an object or array body`) } // A POST request is the only request to not require an ID in spec