Skip to content

Commit

Permalink
optimeraRtd: hotfix for handling score file URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarbartopti committed May 20, 2024
1 parent 2002798 commit 013e519
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/optimeraRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ export function setScoresURL() {
if (apiVersion === 'v1') {
newScoresURL = `${baseUrl}api/products/scores?c=${clientID}&h=${optimeraHost}&p=${optimeraPathName}&s=${device}`;
} else {
newScoresURL = `${baseUrl}${clientID}/${optimeraHost}${optimeraPathName}.js`;
let encoded = encodeURIComponent(`${optimeraHost}${optimeraPathName}`)
.replaceAll('%2F', '/')
.replaceAll('%20', '+');

newScoresURL = `${baseUrl}${clientID}/${encoded}.js`;
}

if (scoresURL !== newScoresURL) {
Expand Down

0 comments on commit 013e519

Please sign in to comment.