Skip to content

Commit

Permalink
Remove location pathname decoding
Browse files Browse the repository at this point in the history
Fixes #505
  • Loading branch information
OliverJAsh authored and peng.yang committed Aug 12, 2019
1 parent f3c345a commit 930f0f7
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions modules/LocationUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,6 @@ export function createLocation(path, state, key, currentLocation) {
location.state = state;
}

try {
location.pathname = decodeURI(location.pathname);
} catch (e) {
if (e instanceof URIError) {
throw new URIError(
'Pathname "' +
location.pathname +
'" could not be decoded. ' +
'This is likely caused by an invalid percent-encoding.'
);
} else {
throw e;
}
}

if (key) location.key = key;

if (currentLocation) {
Expand Down

0 comments on commit 930f0f7

Please sign in to comment.