Skip to content
Snippets Groups Projects
Commit 21f910a3 authored by Simeon Borko's avatar Simeon Borko
Browse files

DownloadScreenshotControls: componentWillUnmount

This should solve the error:

Warning: Can't perform a React state update on an unmounted component.
This is a no-op, but it indicates a memory leak in your application.
To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
parent e7ce693e
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,7 @@ export class DownloadScreenshotControls extends PluginUIComponent<{ close: () => ...@@ -58,6 +58,7 @@ export class DownloadScreenshotControls extends PluginUIComponent<{ close: () =>
} }
componentWillUnmount() { componentWillUnmount() {
super.componentWillUnmount();
this.setState({ imageData: void 0 }); this.setState({ imageData: void 0 });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment