Skip to content

Commit

Permalink
Fix issue #12 - function custom props.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsillitoe committed Feb 17, 2017
1 parent 06c787b commit 6260ad6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "presets": ["es2015", "react"] }
{ "presets": ["es2015", "react", "stage-3"] }
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-currency-input",
"version": "1.2.3",
"version": "1.2.4",
"description": "React component for inputing currency amounts",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -38,6 +38,7 @@
"babel-cli": "^6.18.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-3": "6.22.0",
"babel-register": "^6.9.0",
"babelify": "^7.3.0",
"browserify": "^13.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const CurrencyInput = React.createClass({
* @returns {{ maskedValue: {String}, value: {Number}, customProps: {Object} }}
*/
prepareProps(props) {
let customProps = JSON.parse(JSON.stringify(props)); //not as clean, but better support
let customProps = {...props}; // babeljs converts to Object.assign, then polyfills.
delete customProps.onChange;
delete customProps.value;
delete customProps.decimalSeparator;
Expand Down

0 comments on commit 6260ad6

Please sign in to comment.