Closed birdofpreyru closed 1 year ago
Some change from release v1.23.3 to v1.23.5 breaks React Native's Hermes engine with the message:
ReferenceError: Property 'document' doesn't exist, js engine: hermes.
Update: The following code block causes problems. It should add typeof document !== 'undefined' check into its if condition, to safeguard against RN environment, which is detected as client-side (because it is not Node), but it does not have document either. https://github.com/birdofpreyru/react-utils/blob/3b59c6e131e8b09e7accfca8d2246ae4938b4e4d/src/shared/utils/config.js#L13-L16
typeof document !== 'undefined'
if
document
Some change from release v1.23.3 to v1.23.5 breaks React Native's Hermes engine with the message:
Update: The following code block causes problems. It should add
typeof document !== 'undefined'
check into itsif
condition, to safeguard against RN environment, which is detected as client-side (because it is not Node), but it does not havedocument
either. https://github.com/birdofpreyru/react-utils/blob/3b59c6e131e8b09e7accfca8d2246ae4938b4e4d/src/shared/utils/config.js#L13-L16