diff --git a/src/rules/no-deprecated-props.js b/src/rules/no-deprecated-props.js
index 62dcffc..0ba69c7 100644
--- a/src/rules/no-deprecated-props.js
+++ b/src/rules/no-deprecated-props.js
@@ -722,7 +722,7 @@ module.exports = {
return [fixer.replaceText(propNameNode, replace.name), fixer.replaceText(attr.value, `"${value}"`)]
} else {
const expression = context.getSourceCode().getText(attr.value.expression)
- return [fixer.replaceText(propNameNode, replace.name), fixer.replaceText(attr.value, `"${expression} && '${value}'"`)]
+ return [fixer.replaceText(propNameNode, replace.name), fixer.replaceText(attr.value, `"${expression} ? '${value}' : undefined"`)]
}
} else {
return fixer.replaceText(attr, `${replace.bind ? ':' : ''}${replace.name}="${value}"`)
diff --git a/tests/rules/no-deprecated-props.js b/tests/rules/no-deprecated-props.js
index 50b4298..e574848 100644
--- a/tests/rules/no-deprecated-props.js
+++ b/tests/rules/no-deprecated-props.js
@@ -23,12 +23,12 @@ tester.run('no-deprecated-props', rule, {
},
{
code: '',
- output: ``,
+ output: ``,
errors: [{ messageId: 'replacedWith' }],
},
{
code: '',
- output: ``,
+ output: ``,
errors: [{ messageId: 'replacedWith' }],
},
{
@@ -73,7 +73,7 @@ tester.run('no-deprecated-props', rule, {
},
{
code: '',
- output: ``,
+ output: ``,
errors: [{ messageId: 'replacedWith' }],
},
{