mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-25 16:38:08 +00:00
location state params: param name is used if value is undefined
This commit is contained in:
parent
597007afbd
commit
5f4e43a860
@ -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')) {
|
||||
|
Loading…
Reference in New Issue
Block a user