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

Commit

Permalink
fix: JSXAttribute generation typo (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound authored and gregberge committed Sep 15, 2018
1 parent ae03e3a commit cc03a02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/h2x-plugin-jsx/src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import stringToObjectStyle from './stringToObjectStyle'

const formatAttribute = jsxAttribute => {
if (jsxAttribute.spread) return `{...${jsxAttribute.name}}`
if (jsxAttribute.litteral)
if (jsxAttribute.literal)
return `${jsxAttribute.name}={${jsxAttribute.value}}`
if (jsxAttribute.name === 'style')
return `${jsxAttribute.name}={${JSON.stringify(
Expand Down
2 changes: 1 addition & 1 deletion packages/h2x-plugin-jsx/src/visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
const jsxAttribute = new JSXAttribute()
jsxAttribute.name = getAttributeName(path.node, path.parent)
jsxAttribute.value = getAttributeValue(path.node)
jsxAttribute.litteral = isNumeric(jsxAttribute.value)
jsxAttribute.literal = isNumeric(jsxAttribute.value)
path.replace(jsxAttribute)
},
},
Expand Down

0 comments on commit cc03a02

Please sign in to comment.