Update packages/styled-components/src/utils/isPlainObject.js

Co-authored-by: Jason Miller <developit@users.noreply.github.com>
This commit is contained in:
Evan Jacobs
2021-01-21 19:49:43 -05:00
committed by GitHub
parent 8b007158ef
commit d744b38242

View File

@@ -5,4 +5,4 @@ export default (x: any): boolean =>
typeof x === 'object' &&
(x.toString ? x.toString() : Object.prototype.toString.call(x)) === '[object Object]' &&
/* check for reasonable markers that the object isn't an element for react & preact/compat */
!(x.$$typeof && ('_owner' in x) || x.__v);
!('props' in x && (x.$$typeof || x.constructor === undefined));