Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Use __dirname for locale import if available #5269

Closed
wants to merge 2 commits into from

Conversation

vdmtrv
Copy link
Contributor

@vdmtrv vdmtrv commented Oct 25, 2019

Using core path module to resolve absolute path to locale files as the current implementation was causing a crash in a release build of an Android app built in react-native (v0.60.4) with Hermes enabled.

This should fix both #5252 and #5214

@jsf-clabot
Copy link

jsf-clabot commented Oct 25, 2019

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Oct 25, 2019

Coverage Status

Coverage increased (+0.2%) to 88.646% when pulling e140f47 on vdmtrv:fix/locale-require into 13a61b2 on moment:develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 88.4% when pulling dce59be on vdmtrv:fix/locale-require into 13a61b2 on moment:develop.

@ichernev
Copy link
Contributor

@vdmtrv can you detect react-native and only apply the __dirname in that case? I'm afraid this might break another obscure environment.

@ichernev
Copy link
Contributor

Merged in a207d78

@ichernev ichernev changed the title [locale] fix: importing locales using path.resolve [bugfix] Use __dirname for locale import if available Apr 24, 2020
ichernev added a commit that referenced this pull request Apr 24, 2020
[bugfix] Use __dirname for locale import if available
@ichernev ichernev closed this Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants