Skip to content

Commit

Permalink
fix: Allow other query parameters than participant_id in experiment u…
Browse files Browse the repository at this point in the history
…rl (#839)
  • Loading branch information
drikusroor authored Mar 7, 2024
1 parent 47ac3ad commit c0ead10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const App = () => {
const queryParams = window.location.search;

useEffect(() => {
if (queryParams && !(new URLSearchParams(queryParams).has("participant_id"))) {
setError("Unknown URL parameter, use ?participant_id=");
const urlParams = new URLSearchParams(queryParams);
if (!urlParams.has("participant_id")) {
return;
}
try {
Expand All @@ -34,7 +34,7 @@ const App = () => {
});
} catch (err) {
console.error(err);
setError(err);
setError('Could not load participant');
}
}, [setError, queryParams, setParticipant])

Expand Down

0 comments on commit c0ead10

Please sign in to comment.