diff options
Diffstat (limited to 'web-ui/src/util.js')
-rw-r--r-- | web-ui/src/util.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web-ui/src/util.js b/web-ui/src/util.js index 1b244458..effb3d9c 100644 --- a/web-ui/src/util.js +++ b/web-ui/src/util.js @@ -1,6 +1,7 @@ -export const hasQueryParameter = param => ( - decodeURIComponent(window.location.search.substring(1)).includes(param) -); +export const hasQueryParameter = (param) => { + const decodedUri = decodeURIComponent(window.location.search.substring(1)); + return !(decodedUri.split('&').indexOf(param) < 0); +}; export default { hasQueryParameter |