Explorar o código

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.
Simeon Borko %!s(int64=2) %!d(string=hai) anos
pai
achega
21f910a3ca
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/mol-plugin-ui/viewport/screenshot.tsx

+ 1 - 0
src/mol-plugin-ui/viewport/screenshot.tsx

@@ -58,6 +58,7 @@ export class DownloadScreenshotControls extends PluginUIComponent<{ close: () =>
     }
 
     componentWillUnmount() {
+        super.componentWillUnmount();
         this.setState({ imageData: void 0 });
     }