Skip to content

Commit

Permalink
fix(comp): Fix direct state assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon authored Nov 16, 2017
2 parents c5e2482 + b342330 commit 3f9a584
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 @@ -201,7 +201,7 @@ export abstract class BaseCachedImage<P extends CachedImageProps> extends Compon
componentWillMount() {
const {mutable} = this.props;
const source = this.checkSource(this.props.source);
this.state = { path: undefined };
this.setState({ path: undefined });
if (source.uri) {
this.observe(source as CachedImageURISource, mutable === true);
}
Expand Down

0 comments on commit 3f9a584

Please sign in to comment.