Skip to content

Commit

Permalink
fix: accept both lowercase and camelCase interpretationId in url(#2937)
Browse files Browse the repository at this point in the history
Needed for: https://dhis2.atlassian.net/browse/DHIS2-15441

The analytics interpretation component sends a camelcase interpretationId url parameter. This same format is used in DV and LL.

Including both lowercase and camelcase ensures that this version of maps isn't dependent on also having the updated dashboard app
  • Loading branch information
jenniferarnesen authored Sep 25, 2023
1 parent 1ec1b5c commit c171b3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/interpretations/Interpretations.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const Interpretations = ({ renderCount }) => {

useEffect(() => {
if (isMapLoaded) {
const urlInterpretationId = getUrlParameter('interpretationid')
// analytics interpretation component uses camelcase
const urlInterpretationId =
getUrlParameter('interpretationid') ||
getUrlParameter('interpretationId')

if (urlInterpretationId) {
dispatch(setInterpretation(urlInterpretationId))
Expand Down

0 comments on commit c171b3d

Please sign in to comment.