Skip to content

Commit

Permalink
Merge pull request #628 from hlxsites/625-minor-fix-replace-url
Browse files Browse the repository at this point in the history
625 Fix changed to replace to slice
  • Loading branch information
sharanagoudapatil authored Dec 29, 2023
2 parents 21a110d + 13c55bd commit d5878d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/importer/transformers/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const videoembed = (embedEl, document) => {
const anc = document.createElement('a');
let href = videoEl.getAttribute('src');
if (!href.startsWith('https:') && href.includes('vidyard')) {
if (href[href.length - 1] === '?') href = href.replace('?', '');
if (href[href.length - 1] === '?') href = href.slice(0, -1);
href = `https:${href}`;
}
anc.href = href;
Expand Down

0 comments on commit d5878d7

Please sign in to comment.