Skip to content

Commit

Permalink
Make frontend accept true/false query params case-insensitively.
Browse files Browse the repository at this point in the history
  • Loading branch information
codyml committed Jul 15, 2022
1 parent 02f0568 commit 5051c24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset-frontend/src/utils/urlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export function getUrlParam({ name, type }: UrlParam): unknown {
if (!urlParam) {
return null;
}
if (urlParam === 'true') {
if (urlParam.toLowerCase() === 'true') {
return 1;
}
if (urlParam === 'false') {
if (urlParam.toLowerCase() === 'false') {
return 0;
}
if (!Number.isNaN(Number(urlParam))) {
Expand All @@ -71,7 +71,7 @@ export function getUrlParam({ name, type }: UrlParam): unknown {
if (!urlParam) {
return null;
}
return urlParam !== 'false' && urlParam !== '0';
return urlParam.toLowerCase() !== 'false' && urlParam !== '0';
case 'rison':
if (!urlParam) {
return null;
Expand Down

0 comments on commit 5051c24

Please sign in to comment.