Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Commit cc03a02

Browse files
TrySoundgregberge
authored andcommitted
fix: JSXAttribute generation typo (#13)
1 parent ae03e3a commit cc03a02

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/h2x-plugin-jsx/src/generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import stringToObjectStyle from './stringToObjectStyle'
22

33
const formatAttribute = jsxAttribute => {
44
if (jsxAttribute.spread) return `{...${jsxAttribute.name}}`
5-
if (jsxAttribute.litteral)
5+
if (jsxAttribute.literal)
66
return `${jsxAttribute.name}={${jsxAttribute.value}}`
77
if (jsxAttribute.name === 'style')
88
return `${jsxAttribute.name}={${JSON.stringify(

packages/h2x-plugin-jsx/src/visitor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default {
167167
const jsxAttribute = new JSXAttribute()
168168
jsxAttribute.name = getAttributeName(path.node, path.parent)
169169
jsxAttribute.value = getAttributeValue(path.node)
170-
jsxAttribute.litteral = isNumeric(jsxAttribute.value)
170+
jsxAttribute.literal = isNumeric(jsxAttribute.value)
171171
path.replace(jsxAttribute)
172172
},
173173
},

0 commit comments

Comments
 (0)