mixpanel / mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
107 stars 48 forks source link

ReferenceError: Property 'resolve' doesn't exist #204

Closed SrAnthony closed 1 year ago

SrAnthony commented 1 year ago

There is a typo in the index.js file that causes an error with the Identify function: "ReferenceError: Property 'resolve' doesn't exist" I'm using mixpanel-react-native v2.3.0

Here is the diff that solved my problem:

diff --git a/node_modules/mixpanel-react-native/index.js b/node_modules/mixpanel-react-native/index.js
index 5ef6f3d..47c7390 100644
--- a/node_modules/mixpanel-react-native/index.js
+++ b/node_modules/mixpanel-react-native/index.js
@@ -192,7 +192,7 @@ export class Mixpanel {
      *
      */
     identify(distinctId) {
-        return new Promise((resolvem, reject) => {
+        return new Promise((resolve, reject) => {
             if (!StringHelper.isValid(distinctId)) {
                 StringHelper.raiseError(PARAMS.DISTINCT_ID);
                 reject(new Error('Invalid distinctId'));

This issue body was partially generated by patch-package.

zihejia commented 1 year ago

2.3.1 released! Thanks again! @SrAnthony