mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Lose underscore
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
459e028137
commit
26ae71f093
1 changed files with 6 additions and 6 deletions
|
@ -57,7 +57,7 @@ interface IState {
|
|||
*/
|
||||
@replaceableComponent("views.elements.EditableTextContainer")
|
||||
export default class EditableTextContainer extends React.Component<IProps, IState> {
|
||||
private _unmounted = false;
|
||||
private unmounted = false;
|
||||
public static defaultProps: Partial<IProps> = {
|
||||
initialValue: "",
|
||||
placeholder: "",
|
||||
|
@ -82,13 +82,13 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
|
|||
this.setState({ busy: true });
|
||||
try {
|
||||
const initialValue = await this.props.getInitialValue();
|
||||
if (this._unmounted) return;
|
||||
if (this.unmounted) return;
|
||||
this.setState({
|
||||
busy: false,
|
||||
value: initialValue,
|
||||
});
|
||||
} catch (error) {
|
||||
if (this._unmounted) return;
|
||||
if (this.unmounted) return;
|
||||
this.setState({
|
||||
errorString: error.toString(),
|
||||
busy: false,
|
||||
|
@ -97,7 +97,7 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
|
|||
}
|
||||
|
||||
public componentWillUnmount(): void {
|
||||
this._unmounted = true;
|
||||
this.unmounted = true;
|
||||
}
|
||||
|
||||
private onValueChanged = (value: string, shouldSubmit: boolean): void => {
|
||||
|
@ -112,14 +112,14 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
|
|||
|
||||
this.props.onSubmit(value).then(
|
||||
() => {
|
||||
if (this._unmounted) { return; }
|
||||
if (this.unmounted) { return; }
|
||||
this.setState({
|
||||
busy: false,
|
||||
value: value,
|
||||
});
|
||||
},
|
||||
(error) => {
|
||||
if (this._unmounted) { return; }
|
||||
if (this.unmounted) { return; }
|
||||
this.setState({
|
||||
errorString: error.toString(),
|
||||
busy: false,
|
||||
|
|
Loading…
Reference in a new issue