mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 17:23:18 +08:00
allow empty path to be matched (#1811)
previously when opening a deeplink without a path, it would result in an array of 2 empty strings, which is are falsy values, so the full url was passed on. by checking if the value is actually `undefined` instead of falsy we have no more false positives
This commit is contained in:
@@ -92,7 +92,7 @@ export default function createNavigationContainer<T: *>(
|
||||
const params = {};
|
||||
const delimiter = this.props.uriPrefix || '://';
|
||||
let path = url.split(delimiter)[1];
|
||||
if (!path) {
|
||||
if (typeof path === 'undefined') {
|
||||
path = url;
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user