Skip to content

Commit

Permalink
Properly assign props to component.
Browse files Browse the repository at this point in the history
  • Loading branch information
danawoodman committed May 21, 2015
1 parent 93152f3 commit b3aee58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var _ = require('lodash')
var React = require('react')

module.exports = React.createClass({
Expand Down Expand Up @@ -58,9 +59,6 @@ module.exports = React.createClass({
className += ' ' + this.props.className
}

var props = this.props;
props.className = className;

return React.createElement('span', props)
return React.createElement('span', _.assign({}, this.props, { className: className }))
}
})
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-fontawesome",
"version": "0.2.0",
"version": "0.2.1",
"description": "A React FontAwesome component.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -53,7 +53,9 @@
"engines": {
"node": ">=0.10.0"
},
"dependencies": {},
"dependencies": {
"lodash": "^3.9.1"
},
"peerDependencies": {
"react": "0.13.x"
}
Expand Down

0 comments on commit b3aee58

Please sign in to comment.