Return early if the feedback click handler returns false.

This commit is contained in:
Bauke 2022-03-17 23:41:04 +01:00
parent 3d6898444d
commit 03f3dbc7dc
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 4 additions and 2 deletions

View File

@ -37,8 +37,10 @@ export class FeedbackButton extends Component<
}; };
} }
click = (event: MouseEvent) => { click = async (event: MouseEvent) => {
this.props.click(event); if ((await this.props.click(event)) === false) {
return;
}
let {timeoutHandle} = this.state; let {timeoutHandle} = this.state;
if (timeoutHandle !== undefined) { if (timeoutHandle !== undefined) {