Binding Image's src to 'res://icon' fails as bindings wrap string in String

This commit is contained in:
Panayot Cankov
2017-04-28 15:32:19 +03:00
parent aed7510994
commit effbffac0f

View File

@ -28,7 +28,7 @@ export abstract class ImageBase extends View implements ImageDefinition {
let value = this.src;
let originalValue = value;
let sync = this.loadMode === "sync";
if (typeof value === "string") {
if (typeof value === "string" || value instanceof String) {
value = value.trim();
this.imageSource = null;
this["_url"] = value;