Skip to content

Commit 94e30dd

Browse files
committed
Fixed issue #10. More generic way to clone props.
1 parent b58119b commit 94e30dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-currency-input",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "React component for inputing currency amounts",
55
"main": "lib/index.js",
66
"scripts": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const CurrencyInput = React.createClass({
4949
* @returns {{ maskedValue: {String}, value: {Number}, customProps: {Object} }}
5050
*/
5151
prepareProps(props) {
52-
let customProps = Object.assign({}, props); //polyfilled for environments that do not support it.
52+
let customProps = JSON.parse(JSON.stringify(props)); //not as clean, but better support
5353
delete customProps.onChange;
5454
delete customProps.value;
5555
delete customProps.decimalSeparator;

0 commit comments

Comments
 (0)