aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/SubmissionNotice.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/SubmissionNotice.tsx')
-rw-r--r--src/render/SubmissionNotice.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/SubmissionNotice.tsx b/src/render/SubmissionNotice.tsx
index 5f646063..9164666d 100644
--- a/src/render/SubmissionNotice.tsx
+++ b/src/render/SubmissionNotice.tsx
@@ -35,7 +35,7 @@ class SubmissionNotice {
contentContainer={contentContainer}
callback={callback}
ref={this.noticeRef}
- closeListener={() => this.close()} />,
+ closeListener={() => this.close(false)} />,
this.noticeElement
);
}
@@ -44,7 +44,8 @@ class SubmissionNotice {
this.noticeRef.current.forceUpdate();
}
- close(): void {
+ close(callRef = true): void {
+ if (callRef) this.noticeRef.current.cancel();
ReactDOM.unmountComponentAtNode(this.noticeElement);
this.noticeElement.remove();