mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Fix setting src on async image mismatching imageSource
This commit is contained in:
@ -156,7 +156,7 @@ function printRunTestStats() {
|
||||
let finalMessage = `\n=== ALL TESTS COMPLETE ===\n` +
|
||||
`${(allTests.length - failedTestCount)} OK, ${failedTestCount} failed\n` +
|
||||
`DURATION: ${totalTime} ms\n`;
|
||||
TKUnit.write(finalMessage, messageType.info);
|
||||
TKUnit.write(finalMessage, messageType.info);
|
||||
|
||||
for (j = 0; j < failedTestInfo.length; j++) {
|
||||
let failureMessage = failedTestInfo[j];
|
||||
|
@ -97,7 +97,8 @@ export class Image extends view.View implements definition.Image {
|
||||
|
||||
var source = new imageSource.ImageSource();
|
||||
var imageLoaded = () => {
|
||||
if (value !== this.src) {
|
||||
let currentValue = this.src;
|
||||
if (!types.isString(this.src) || value !== currentValue.trim()) {
|
||||
return;
|
||||
}
|
||||
this.imageSource = source;
|
||||
|
Reference in New Issue
Block a user