diff --git a/src/utils/isPlainObject.js b/src/utils/isPlainObject.js index 30140999c..3560c2ca0 100644 --- a/src/utils/isPlainObject.js +++ b/src/utils/isPlainObject.js @@ -3,14 +3,12 @@ * @returns {boolean} True if the argument appears to be a plain object. */ export default function isPlainObject(obj) { - if (typeof obj !== 'object' || obj === null) return false - - let prototypeOfObj = Object.getPrototypeOf(obj) - let proto = obj - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto) - - } - - return prototypeOfObj === proto - } \ No newline at end of file + if (typeof obj !== 'object' || obj === null) return false + + let proto = obj + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto) + } + + return Object.getPrototypeOf(obj) === proto +}