diff --git a/src/Player.tsx b/src/Player.tsx index 4088ecd..b0e0de5 100644 --- a/src/Player.tsx +++ b/src/Player.tsx @@ -298,6 +298,10 @@ export class Player extends React.Component { animationData = await fetchResult.json(); } + if (this.unmounted) { + return; + } + // Clear previous animation, if any if (instance) { instance.destroy();