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:
Koen Punt
2017-06-23 05:30:12 +02:00
parent a97529afc1
commit ed923edd25

View File

@@ -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 {