mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 12:57:42 +08:00
Fix setting src on async image mismatching imageSource
This commit is contained in:
@ -97,7 +97,8 @@ export class Image extends view.View implements definition.Image {
|
|||||||
|
|
||||||
var source = new imageSource.ImageSource();
|
var source = new imageSource.ImageSource();
|
||||||
var imageLoaded = () => {
|
var imageLoaded = () => {
|
||||||
if (value !== this.src) {
|
let currentValue = this.src;
|
||||||
|
if (!types.isString(this.src) || value !== currentValue.trim()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.imageSource = source;
|
this.imageSource = source;
|
||||||
|
Reference in New Issue
Block a user