Skip to content

Commit 795ac06

Browse files
author
Alexander Vakrilov
authored
Merge pull request #4078 from NativeScript/fix-image-src-binding
Binding Image's src to 'res://icon' fails as bindings wrap string in String
2 parents aed7510 + effbffa commit 795ac06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tns-core-modules/ui/image/image-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export abstract class ImageBase extends View implements ImageDefinition {
2828
let value = this.src;
2929
let originalValue = value;
3030
let sync = this.loadMode === "sync";
31-
if (typeof value === "string") {
31+
if (typeof value === "string" || value instanceof String) {
3232
value = value.trim();
3333
this.imageSource = null;
3434
this["_url"] = value;

0 commit comments

Comments
 (0)