xxxOn 限制为字符串类型时才执行

This commit is contained in:
liaoxuezhi 2019-08-12 18:20:31 +08:00 committed by catchonme
parent 4b2cb76372
commit 93214440cd

View File

@ -31,7 +31,7 @@ export default function getExprProperties(schema:PlainObject, data:object = {},
let parts = /^(.*)(On|Expr)$/.exec(key);
let value:any = schema[key];
if (value && parts && (parts[2] === 'On' || parts[2] === 'Expr')) {
if (value && typeof value === 'string' && parts && (parts[2] === 'On' || parts[2] === 'Expr')) {
key = parts[1];
if (parts[2] === 'On' || parts[2] === 'Expr') {