From 3352b51e4cf5a002ff5b6050f38ab34658bc985a Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 25 Sep 2020 21:20:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A8=A1=E6=9D=BF=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E7=A9=BA=E5=AF=B9=E8=B1=A1=E7=BC=96=E8=AF=91=E5=88=B0=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-template-compiler/lib/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/uni-template-compiler/lib/util.js b/packages/uni-template-compiler/lib/util.js index fc4cbb22a..f482a3e8c 100644 --- a/packages/uni-template-compiler/lib/util.js +++ b/packages/uni-template-compiler/lib/util.js @@ -183,7 +183,7 @@ const tags = require('@dcloudio/uni-cli-shared/lib/tags') const { isBuiltInComponent -} = require('@dcloudio/uni-cli-shared/lib/pages') +} = require('@dcloudio/uni-cli-shared/lib/pages') const { getTagName @@ -223,7 +223,7 @@ function makeMap (str, expectsLowerCase) { * @param {*} node */ function isSimpleObjectExpression (node) { - return t.isObjectExpression(node) && !node.properties.find(({ + return t.isObjectExpression(node) && node.properties.length && !node.properties.find(({ key, value }) => !t.isIdentifier(key) || !(t.isIdentifier(value) || t.isStringLiteral(value) || t.isBooleanLiteral(value) || @@ -261,4 +261,4 @@ module.exports = { processMemberExpression, getForIndexIdentifier, isSimpleObjectExpression -} +} -- GitLab