From a82ab5fc4bcef91e75f340cb3462ab98fb51682b Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 3 Mar 2017 20:19:56 +0800 Subject: [PATCH] Fix setState on unmounted Upload, close #5162 --- components/upload/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/upload/index.tsx b/components/upload/index.tsx index 5564328093..f843e8ece5 100644 --- a/components/upload/index.tsx +++ b/components/upload/index.tsx @@ -90,6 +90,10 @@ export default class Upload extends React.Component { }; } + componentWillUnmount() { + this.clearProgressTimer(); + } + onStart = (file) => { let targetItem; let nextFileList = this.state.fileList.concat();