Skip to content

Conversation

Shiranuit
Copy link
Contributor

@Shiranuit Shiranuit commented Jan 2, 2023

What does this PR do ?

Fixes an edge case happening with react-native.

Frameworks like react-native sometimes emulate the window object when running outside of the browser,
this causes an edge case where the window object exists but window.location doesn't since there is no pages in an iOS / Android application for example.
This caused our debug utility to call new URL on an undefined value throwing an error,
This was preventing the usage of the SDK with react-native like in the issue #703.

@Shiranuit Shiranuit self-assigned this Jan 2, 2023
@Shiranuit Shiranuit changed the base branch from master to 7-dev January 2, 2023 14:38
@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Merging #718 (fdb9750) into 7-dev (a7b70a8) will decrease coverage by 0.03%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##            7-dev     #718      +/-   ##
==========================================
- Coverage   83.21%   83.18%   -0.04%     
==========================================
  Files          45       45              
  Lines        2085     2087       +2     
  Branches      397      397              
==========================================
+ Hits         1735     1736       +1     
- Misses        272      273       +1     
  Partials       78       78              
Impacted Files Coverage Δ
src/utils/debug.js 57.14% <71.42%> (-1.20%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Shiranuit Shiranuit merged commit 536f1ee into 7-dev Jan 3, 2023
@Shiranuit Shiranuit deleted the fix/error-with-react-native branch January 3, 2023 11:45
@Shiranuit Shiranuit mentioned this pull request Jan 9, 2023
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.

4 participants