Skip to content

Commit fac91e0

Browse files
koenpuntskevy
authored andcommitted
allow empty path to be matched (react-navigation#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
1 parent 608217a commit fac91e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/createNavigationContainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default function createNavigationContainer<T: *>(
9292
const params = {};
9393
const delimiter = this.props.uriPrefix || '://';
9494
let path = url.split(delimiter)[1];
95-
if (!path) {
95+
if (typeof path === 'undefined') {
9696
path = url;
9797
}
9898
return {

0 commit comments

Comments
 (0)