X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Faccounts%2Fsrc%2Faccount%2Faccount.jsx;h=b7dbf358cf173f34933719e73254cb74a424364b;hb=ef3a1f2ff2307664018018f4049ecf1a195e3d32;hp=45b31fcf6942f41e04c60b28a5aea90510273a7a;hpb=ea969fdb66c5c0b0754d5c03e13690770a282088;p=osm%2FUI.git diff --git a/skyquake/plugins/accounts/src/account/account.jsx b/skyquake/plugins/accounts/src/account/account.jsx index 45b31fcf6..b7dbf358c 100644 --- a/skyquake/plugins/accounts/src/account/account.jsx +++ b/skyquake/plugins/accounts/src/account/account.jsx @@ -18,7 +18,7 @@ import React from 'react'; import Button from 'widgets/button/rw.button.js'; -import _ from 'lodash'; +import _cloneDeep from 'lodash/cloneDeep'; import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx'; import Crouton from 'react-crouton'; import TextInput from 'widgets/form_controls/textInput.jsx'; @@ -47,7 +47,6 @@ class Account extends React.Component { } } componentWillUnmount() { - this.props.store.closeSocket(); this.props.store.unlisten(this.storeListener); } setUp(props){ @@ -95,7 +94,7 @@ class Account extends React.Component { } } - let newAccount = _.cloneDeep(removeTrailingWhitespace(Account)); + let newAccount = _cloneDeep(removeTrailingWhitespace(Account)); delete newAccount.params; newAccount.nestedParams && newAccount.nestedParams['container-name'] && @@ -170,7 +169,7 @@ class Account extends React.Component { } evaluateSubmit = (e) => { if (e.keyCode == 13) { - if (this.props.edit) { + if (this.props.params.name != 'create') { this.update(e); } else { this.create(e);