Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions js/src/common/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IIn
<div className="Modal-close App-backControl">
{Button.component({
icon: 'fas fa-times',
onclick: this.hide.bind(this),
onclick: () => this.hide(),
className: 'Button Button--icon Button--link',
'aria-label': app.translator.trans('core.lib.modal.close'),
})}
Expand Down Expand Up @@ -148,14 +148,14 @@ export default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IIn
/**
* Hides the modal.
*/
hide() {
hide(): void {
this.attrs.state.close();
}

/**
* Sets `loading` to false and triggers a redraw.
*/
loaded() {
loaded(): void {
this.loading = false;
m.redraw();
}
Expand All @@ -164,7 +164,7 @@ export default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IIn
* Shows an alert describing an error returned from the API, and gives focus to
* the first relevant field involved in the error.
*/
onerror(error: RequestError) {
onerror(error: RequestError): void {
this.alertAttrs = error.alert;

m.redraw();
Expand Down