parryworld / react-native-appupdate

Update apk and update from app store in React Native.
MIT License
85 stars 36 forks source link

reassignment of const variable jobId #17

Open nyilmaz opened 5 years ago

nyilmaz commented 5 years ago

https://github.com/parryworld/react-native-appupdate/blob/master/index.js#L11 here job is defined as constant but, it is reassigned here:

https://github.com/parryworld/react-native-appupdate/blob/master/index.js#L81

changing const to let resolves issue. Related error in android as follows: com.facebook.react.common.JavascriptException: undefined is not a function (evaluating 'babelHelpers.readOnlyError("jobId")') crashes application.

carvalhonm commented 5 years ago

Same problem in my app changing to let fix it

mikehardy commented 5 years ago

I'm trying to update this module since I want to use it - I'm giving it a go here https://www.npmjs.com/package/rn-update-apk / https://github.com/mikehardy/react-native-update-apk - it's fixed and released there with an example app to make sure I didn't break anything