mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 22:44:52 +00:00
committed by
Nicolas Gallagher
parent
8add92f776
commit
c6425a0048
+1
-1
@@ -236,7 +236,7 @@ const Image = forwardRef<ImageProps, *>((props, ref) => {
|
||||
function load(e) {
|
||||
updateState(LOADED);
|
||||
if (onLoad) {
|
||||
onLoad();
|
||||
onLoad(e);
|
||||
}
|
||||
if (onLoadEnd) {
|
||||
onLoadEnd();
|
||||
|
||||
@@ -119,7 +119,7 @@ const ImageLoader = {
|
||||
image.onerror = onError;
|
||||
image.onload = e => {
|
||||
// avoid blocking the main thread
|
||||
const onDecode = () => onLoad();
|
||||
const onDecode = () => onLoad({ nativeEvent: e });
|
||||
if (typeof image.decode === 'function') {
|
||||
// Safari currently throws exceptions when decoding svgs.
|
||||
// We want to catch that error and allow the load handler
|
||||
|
||||
Reference in New Issue
Block a user