Skip to content

Commit

Permalink
fix: clear image if src is null
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Aug 1, 2019
1 parent cbd2494 commit 5430c13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/image.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ export class Img extends ImageBase {
}

this.nativeViewProtected.setController(controller);
} else {
this.nativeViewProtected.setController(null);
this.nativeViewProtected.setController(null);
this.nativeViewProtected.setImageBitmap(null);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/image.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ export class Img extends ImageBase {
this.onLoadProgress,
this.handleImageLoaded
);
} else {
this._setNativeImage(null);
}
}
}
Expand Down

0 comments on commit 5430c13

Please sign in to comment.