From bb80b61c3ce8e3f6a944d25ca48a7c04131ca508 Mon Sep 17 00:00:00 2001 From: Prasanth Date: Wed, 19 Dec 2018 20:29:55 +0530 Subject: [PATCH] fixes #9224 Warn when the type of a prop isn't a constructor --- src/core/util/props.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/util/props.js b/src/core/util/props.js index 1b57f77cdb5..63625b8700b 100644 --- a/src/core/util/props.js +++ b/src/core/util/props.js @@ -165,8 +165,10 @@ function assertType (value: any, type: Function): { valid = isPlainObject(value) } else if (expectedType === 'Array') { valid = Array.isArray(value) - } else { + } else if (type.prototype instanceof Object){ valid = value instanceof type + } else { + valid = false } return { valid,