mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 18:47:51 +08:00
feat(babel6): Don't use _.clone on Model objects
This commit is contained in:
parent
f2d153c87b
commit
cc1f6e46dd
2 changed files with 3 additions and 3 deletions
|
@ -12,11 +12,11 @@ class PreferencesAccountDetails extends Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {account: _.clone(props.account)};
|
this.state = {account: props.account.clone()};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
this.setState({account: _.clone(nextProps.account)});
|
this.setState({account: nextProps.account.clone()});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default class Account extends ModelWithMetadata {
|
||||||
modelKey: 'syncState',
|
modelKey: 'syncState',
|
||||||
jsonKey: 'sync_state',
|
jsonKey: 'sync_state',
|
||||||
}),
|
}),
|
||||||
})
|
});
|
||||||
|
|
||||||
constructor(args) {
|
constructor(args) {
|
||||||
super(args)
|
super(args)
|
||||||
|
|
Loading…
Reference in a new issue