Skip to content

Commit

Permalink
Fixed issue #10. More generic way to clone props.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsillitoe committed Feb 13, 2017
1 parent b58119b commit 94e30dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 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.1",
"version": "1.2.2",
"description": "React component for inputing currency amounts",
"main": "lib/index.js",
"scripts": {
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 = Object.assign({}, props); //polyfilled for environments that do not support it.
let customProps = JSON.parse(JSON.stringify(props)); //not as clean, but better support
delete customProps.onChange;
delete customProps.value;
delete customProps.decimalSeparator;
Expand Down

0 comments on commit 94e30dd

Please sign in to comment.