Skip to content

Hii #44

@jainrocks999

Description

@jainrocks999

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-scalable-image@1.1.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-scalable-image/index.js b/node_modules/react-native-scalable-image/index.js
index 655e3b3..c9aff52 100644
--- a/node_modules/react-native-scalable-image/index.js
+++ b/node_modules/react-native-scalable-image/index.js
@@ -91,7 +91,7 @@ const ScalableImage = props => {
             setScalableWidth(computedWidth);
             setScalableHeight(computedHeight);
 
-            props.onSize({ width: computedWidth, height: computedHeight });
+         props?.onSize?   props.onSize({ width: computedWidth, height: computedHeight }):null;
         }
     };
 

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions