Fix setting src on async image mismatching imageSource

This commit is contained in:
Panayot Cankov
2016-06-09 16:08:53 +03:00
parent f5dbdc33e1
commit 20dc0bd7d3
2 changed files with 3 additions and 2 deletions

View File

@ -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];

View File

@ -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;