Lose underscore

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-09-20 17:16:01 +02:00
parent 459e028137
commit 26ae71f093
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D
1 changed files with 6 additions and 6 deletions

View File

@ -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,