diff --git a/src/Container.tsx b/src/Container.tsx index bb78d98..54af251 100644 --- a/src/Container.tsx +++ b/src/Container.tsx @@ -68,8 +68,10 @@ class Container extends Component { } componentWillUnmount() { - this.container.dispose(); - this.container = null!; + if (this.container) { + this.container.dispose(); + this.container = null!; + } } componentDidUpdate(prevProps: ContainerProps) {