Skip to content

Fix dependence in area-context #231

@JuanEstepa

Description

@JuanEstepa

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-css-interop@0.2.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-css-interop/.cache/android.js b/node_modules/react-native-css-interop/.cache/android.js
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-css-interop/.cache/ios.js b/node_modules/react-native-css-interop/.cache/ios.js
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-css-interop/.cache/macos.js b/node_modules/react-native-css-interop/.cache/macos.js
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-css-interop/.cache/native.js b/node_modules/react-native-css-interop/.cache/native.js
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-css-interop/.cache/windows.js b/node_modules/react-native-css-interop/.cache/windows.js
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-css-interop/dist/runtime/third-party-libs/react-native-safe-area-context.native.js b/node_modules/react-native-css-interop/dist/runtime/third-party-libs/react-native-safe-area-context.native.js
index ee4b7a7..6b61fc6 100644
--- a/node_modules/react-native-css-interop/dist/runtime/third-party-libs/react-native-safe-area-context.native.js
+++ b/node_modules/react-native-css-interop/dist/runtime/third-party-libs/react-native-safe-area-context.native.js
@@ -6,6 +6,9 @@ const react_native_1 = require("react-native");
 const styles_1 = require("../native/styles");
 let safeAreaProviderShim;
 function maybeHijackSafeAreaProvider(type) {
+    if (!type || typeof type !== 'function') {
+        return type;
+    }
     const name = type.displayName || type.name;
     if (react_native_1.Platform.OS !== "web" && name === "SafeAreaProvider") {
         safeAreaProviderShim ||= shimFactory(type);

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions