From: Evan You Date: Mon, 17 Aug 2020 15:25:27 +0000 (-0400) Subject: fix(runtime-core): fix Object props validation for objects with custom toStringTag X-Git-Tag: v3.0.0-rc.6~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ccd9ac2bc8ea09978fbb99c272bff6614387e90;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): fix Object props validation for objects with custom toStringTag fix #1872 --- diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index 90d28015b3..96b365b50e 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -497,7 +497,7 @@ function assertType(value: unknown, type: PropConstructor): AssertionResult { valid = value instanceof type } } else if (expectedType === 'Object') { - valid = toRawType(value) === 'Object' + valid = isObject(value) } else if (expectedType === 'Array') { valid = isArray(value) } else {