From 07e99fbb0f65f3159546719b3c6521c611e33949 Mon Sep 17 00:00:00 2001 From: wunci Date: Fri, 26 Jan 2024 11:21:25 +0800 Subject: [PATCH] fix: wrap "propsAttr" with quotation --- package-lock.json | 14 +++++++------- package.json | 2 +- src/compilers/anode-compiler.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 16cab6cf..0a0f3451 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "mkdirp": "^1.0.4", "mustache": "^4.0.1", "san": "^3.14.1", - "san-html-cases": "^3.14.3", + "san-html-cases": "^3.14.5", "san-ssr-target-fake-cmd": "^1.0.0", "san-ssr-target-fake-esm": "^1.0.0", "source-map-support": "^0.5.19", @@ -15413,9 +15413,9 @@ "dev": true }, "node_modules/san-html-cases": { - "version": "3.14.3", - "resolved": "https://registry.npmmirror.com/san-html-cases/-/san-html-cases-3.14.3.tgz", - "integrity": "sha512-HdWsLcuguYYxhoeXe09mnLeHrkNsbREG6ltSF+6Mo7NAldn40QPzy49qGOWUbkZBKHT1FoFFmGiyEqc+DtW2/g==", + "version": "3.14.5", + "resolved": "https://registry.npmmirror.com/san-html-cases/-/san-html-cases-3.14.5.tgz", + "integrity": "sha512-wr09yYp2OD811sHATw1W2dAMz5KuR+Dhh1s4bRo8dH33ayJdcL2tE3a/P/1v/82/O1erjc1ySa2B0w5g5pc0Lw==", "dev": true }, "node_modules/san-ssr-target-fake-cmd": { @@ -29791,9 +29791,9 @@ "dev": true }, "san-html-cases": { - "version": "3.14.3", - "resolved": "https://registry.npmmirror.com/san-html-cases/-/san-html-cases-3.14.3.tgz", - "integrity": "sha512-HdWsLcuguYYxhoeXe09mnLeHrkNsbREG6ltSF+6Mo7NAldn40QPzy49qGOWUbkZBKHT1FoFFmGiyEqc+DtW2/g==", + "version": "3.14.5", + "resolved": "https://registry.npmmirror.com/san-html-cases/-/san-html-cases-3.14.5.tgz", + "integrity": "sha512-wr09yYp2OD811sHATw1W2dAMz5KuR+Dhh1s4bRo8dH33ayJdcL2tE3a/P/1v/82/O1erjc1ySa2B0w5g5pc0Lw==", "dev": true }, "san-ssr-target-fake-cmd": { diff --git a/package.json b/package.json index de5ce495..47fb1844 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "mkdirp": "^1.0.4", "mustache": "^4.0.1", "san": "^3.14.1", - "san-html-cases": "^3.14.3", + "san-html-cases": "^3.14.5", "san-ssr-target-fake-cmd": "^1.0.0", "san-ssr-target-fake-esm": "^1.0.0", "source-map-support": "^0.5.19", diff --git a/src/compilers/anode-compiler.ts b/src/compilers/anode-compiler.ts index 6e66198c..b63fcc94 100644 --- a/src/compilers/anode-compiler.ts +++ b/src/compilers/anode-compiler.ts @@ -244,7 +244,7 @@ export class ANodeCompiler { const rootAttrExec = [] if (Object.keys(propsAttrAssign).length) { rootAttrExec.push(...[ - DEF('propsAttr', new MapLiteral(Object.keys(propsAttrAssign).map(name => [I(name), I('1')]))), + DEF('propsAttr', new MapLiteral(Object.keys(propsAttrAssign).map(name => [L(name), L(1)]))), new Foreach(I('key'), I('val'), I('attrs'), [ // 如果props已经存在对应属性,则attr重复的属性需要被删除 new If(