chore: minor tweaks

This commit is contained in:
daiwei 2025-01-01 18:25:22 +08:00
parent 8484ddace5
commit 06f525249d
2 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok) ? () => {
const n2 = t0()
return n2
} : _ctx.orNot ? () => {
} : (_ctx.orNot) ? () => {
const n5 = t1()
const n6 = t2()
return [n5, n6]
@ -104,7 +104,7 @@ export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok) ? () => {
const n2 = t0()
return n2
} : _ctx.orNot ? () => {
} : (_ctx.orNot) ? () => {
const n4 = t1()
return n4
} : () => {
@ -124,7 +124,7 @@ export function render(_ctx) {
const n0 = _createIf(() => (_ctx.ok) ? () => {
const n2 = t0()
return n2
} : _ctx.orNot ? () => {
} : (_ctx.orNot) ? () => {
const n4 = t1()
return n4
} : undefined)

View File

@ -14,9 +14,9 @@ export function genIf(
const [frag, push] = buildCodeFragment()
const codes: CodeFragment[] = [
isNested ? undefined : '() => (',
isNested ? '(' : '() => (',
...genExpression(condition, context),
isNested ? undefined : ')',
')',
]
let positiveArg = genBlock(positive, context)