mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 17:18:09 +00:00
fix 2953 (#2976)
This commit is contained in:
parent
fafe68b8cb
commit
44616dd45a
@ -30,6 +30,14 @@ function _getUuid() {
|
||||
return `${uniqueBaseId}-${uuidCount++}`;
|
||||
}
|
||||
|
||||
function isEmpty(obj: ?Object): boolean {
|
||||
if (!obj) return true;
|
||||
for (let key in obj) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export default (
|
||||
routeConfigs: NavigationRouteConfigMap,
|
||||
stackConfig: NavigationStackRouterConfig = {}
|
||||
@ -375,9 +383,9 @@ export default (
|
||||
|
||||
// reduce the items of the query string. any query params may
|
||||
// be overridden by path params
|
||||
const queryParams =
|
||||
inputParams ||
|
||||
(queryString || '').split('&').reduce((result: *, item: string) => {
|
||||
const queryParams = !isEmpty(inputParams)
|
||||
? inputParams
|
||||
: (queryString || '').split('&').reduce((result: *, item: string) => {
|
||||
if (item !== '') {
|
||||
const nextResult = result || {};
|
||||
const [key, value] = item.split('=');
|
||||
|
Loading…
x
Reference in New Issue
Block a user