Skip to content

Commit af1ac5d

Browse files
committed
#201 Instead of mutating props, create and modify a copy of attributes
1 parent 5a108a6 commit af1ac5d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/EasyEdit.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,11 @@ export default class EasyEdit extends React.Component {
618618
}
619619

620620
cullAttributes() {
621-
const { attributes } = this.props;
621+
const attributes = { ...this.props.attributes };
622622
delete attributes["type"];
623623
delete attributes["onChange"];
624624
delete attributes["value"];
625+
return attributes;
625626
}
626627

627628
renderEditMode() {

0 commit comments

Comments
 (0)