1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 01:08:27 +00:00

location state params: param name is used if value is undefined

This commit is contained in:
Szymon Lesisz 2018-05-24 18:39:27 +02:00
parent 597007afbd
commit 5f4e43a860

View File

@ -31,7 +31,7 @@ const pathToParams = (path: string): RouterLocationState => {
if (urlParts.length < 1 || path === "/") return params;
for (let i = 0, len = urlParts.length; i < len; i+=2) {
params[ urlParts[i] ] = urlParts[ i + 1 ];
params[ urlParts[i] ] = urlParts[ i + 1 ] || urlParts[i];
}
if (params.hasOwnProperty('device')) {