Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Fix passing url prop to Root and App components

Saúl Ibarra Corretgéd5e89a60b78b
diff --git a/react/index.native.js b/react/index.native.js
index 3617bc399f..66f59d5c31 100644
--- a/react/index.native.js
+++ b/react/index.native.js
@@ -60,13 +60,19 @@ class Root extends Component {
// have precedence.
if (typeof this.props.url === 'undefined') {
Linking.getInitialURL()
- .then(url => this.setState({ url }))
+ .then(url => {
+ if (typeof this.state.url === 'undefined') {
+ this.setState({ url });
+ }
+ })
.catch(err => {
console.error('Failed to get initial URL', err);
- // Start with an empty URL if getting the initial URL fails;
- // otherwise, nothing will be rendered.
- this.setState({ url: null });
+ if (typeof this.state.url === 'undefined') {
+ // Start with an empty URL if getting the initial URL
+ // fails; otherwise, nothing will be rendered.
+ this.setState({ url: null });
+ }
});
}
}