Skip to content

Commit 6f21eb8

Browse files
committed
fix(template): prevent default values from overriding props
1 parent 6964768 commit 6f21eb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/template.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class BaseTemplate {
175175
? `xs.d(i.${propAlias})`
176176
: `i.${propAlias}===undefined?${propValue}:i.${propAlias}`
177177
} else {
178-
propValue = `i.${propAlias}||${propValue || singleQuote('')}`
178+
propValue = `i.${propAlias}!==undefined?i.${propAlias}:${propValue || singleQuote('')}`
179179
}
180180

181181
prop = this.replacePropName(prop, propValue, compName, componentAlias)

0 commit comments

Comments
 (0)