Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function updateUrlQuery(
queryReplacements: EncodedQueryWithNulls,
location: Location,
history: PushReplaceHistory,
updateType: UrlUpdateType = 'replaceIn'
): void {
switch (updateType) {
case 'replaceIn':
history.replace(updateInLocation(queryReplacements, location));
break;
case 'pushIn':
history.push(updateInLocation(queryReplacements, location));
break;
case 'replace':
history.replace(updateLocation(queryReplacements, location));
break;
case 'push':
history.push(updateLocation(queryReplacements, location));
break;
default:
}
}
export function updateUrlQuery(
queryReplacements: EncodedQueryWithNulls,
location: Location,
history: PushReplaceHistory,
updateType: UrlUpdateType = 'replaceIn'
): void {
switch (updateType) {
case 'replaceIn':
history.replace(updateInLocation(queryReplacements, location));
break;
case 'pushIn':
history.push(updateInLocation(queryReplacements, location));
break;
case 'replace':
history.replace(updateLocation(queryReplacements, location));
break;
case 'push':
history.push(updateLocation(queryReplacements, location));
break;
default:
}
}