Fix(code-uri): use href instead of search to remove code uri
This commit is contained in:
@ -65,7 +65,7 @@ export function getCodeUri(location, decodeURIComponent) {
|
|||||||
|
|
||||||
export function removeCodeUri(location, history) {
|
export function removeCodeUri(location, history) {
|
||||||
if (
|
if (
|
||||||
typeof location.search.split !== 'function' ||
|
typeof location.href.split !== 'function' ||
|
||||||
typeof history.replaceState !== 'function'
|
typeof history.replaceState !== 'function'
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
@ -73,7 +73,7 @@ export function removeCodeUri(location, history) {
|
|||||||
history.replaceState(
|
history.replaceState(
|
||||||
history.state,
|
history.state,
|
||||||
null,
|
null,
|
||||||
location.search.split('?')[0]
|
location.href.split('?')[0]
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user