heap / react-native-heap

A React Native integration for Heap
MIT License
82 stars 36 forks source link

fix(android): Log.w(string, string) #347

Closed theonetheycallneo closed 2 years ago

theonetheycallneo commented 2 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @heap/react-native-heap@0.22.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@heap/react-native-heap/android/src/main/java/com/heapanalytics/reactnative/RNHeapLibraryModule.java b/node_modules/@heap/react-native-heap/android/src/main/java/com/heapanalytics/reactnative/RNHeapLibraryModule.java
index f689312..66aaf22 100644
--- a/node_modules/@heap/react-native-heap/android/src/main/java/com/heapanalytics/reactnative/RNHeapLibraryModule.java
+++ b/node_modules/@heap/react-native-heap/android/src/main/java/com/heapanalytics/reactnative/RNHeapLibraryModule.java
@@ -83,7 +83,7 @@ public class RNHeapLibraryModule extends ReactContextBaseJavaModule {
         // The JS bridge will flatten maps and arrays in a uniform manner across both
         // platforms.
         // If we get them at this point, we shouldn't continue.
-        Log.w("Property objects must be flattened before being sent across the JS bridge. If you get this warning please inspect for non-flattenable objects being sent to Heap");
+        Log.w("RNHeapLibraryModule", "Property objects must be flattened before being sent across the JS bridge. If you get this warning please inspect for non-flattenable objects being sent to Heap");
       }
     }
     return stringMap;

This issue body was partially generated by patch-package.

bnickel commented 2 years ago

This has been fixed in #349 and will be released today.