Skip to content

Commit

Permalink
Merge pull request #38 from SimonErich/SimonErich-patch-1
Browse files Browse the repository at this point in the history
Fixed "setState on unmounted component"
  • Loading branch information
wcandillon authored Mar 24, 2019
2 parents 6089f39 + 515acde commit 863d8f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class ProgressiveImage extends React.Component<ProgressiveImageProps, Pro
.then(srcDataURI => !this.unmounted && this.setState({ src: srcDataURI, blur: 0 }));
}

componentWillUnMount() {
componentWillUnmount() {
this.unmounted = true;
}

Expand Down

0 comments on commit 863d8f7

Please sign in to comment.