mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #4078 from NativeScript/fix-image-src-binding
Binding Image's src to 'res://icon' fails as bindings wrap string in String
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user