Skip to content

Commit 9ded337

Browse files
committed
check mounted
1 parent aef794c commit 9ded337

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-upload",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "upload ui component for react",
55
"keywords": [
66
"react",

src/AjaxUploader.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint react/no-is-mounted:0*/
2+
13
import request from './request';
24
import React, { PropTypes } from 'react';
35
import getUid from './uid';
@@ -96,6 +98,9 @@ const AjaxUploader = React.createClass({
9698
},
9799

98100
post(file) {
101+
if (!this.isMounted()) {
102+
return;
103+
}
99104
const { props } = this;
100105
let { data } = props;
101106
const { onStart } = props;

0 commit comments

Comments
 (0)