Skip to content

Commit

Permalink
VideoPress: do not use JS template strings to build queryString of th…
Browse files Browse the repository at this point in the history
…e chapter file to avoid concat_js=no issues (#28915)
  • Loading branch information
retrofox authored Feb 13, 2023
1 parent 6b6631a commit e19693e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

VideoPress: do not use JS template to build queryString of the chapter file to avoid concat_js=no issues
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,13 @@ export default function VideoPressEdit( {
return;
}

const queryString = token
? `?${ new URLSearchParams( { metadata_token: token } ).toString() }`
: '';
let queryString = '';
if ( token ) {
queryString = '?' + new URLSearchParams( { metadata_token: token } ).toString();
}

const chapterUrl = `https://videos.files.wordpress.com/${ guid }/${ chapter.src }${ queryString }`;
const chapterUrl =
'https://videos.files.wordpress.com/' + guid + '/' + chapter.src + queryString;

try {
fetch( chapterUrl )
Expand Down

0 comments on commit e19693e

Please sign in to comment.