Skip to content

Commit 8ba8d92

Browse files
committed
fix: prevent error on null image proeprties
1 parent 84dc4cf commit 8ba8d92

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/index.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function nativeImageProperty(...args) {
115115
},
116116
toNative(value) {
117117
value = _createImageSourceFromSrc(value);
118-
return value.android as android.graphics.Bitmap;
118+
return value?.android as android.graphics.Bitmap;
119119
},
120120
},
121121
},

src/index.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function nativeImageProperty(...args) {
112112
},
113113
toNative(value) {
114114
value = _createImageSourceFromSrc(value);
115-
return value.ios as UIImage;
115+
return value?.ios as UIImage;
116116
},
117117
},
118118
},

0 commit comments

Comments
 (0)