Skip to content

Commit

Permalink
Merge pull request #82 from asad-rafter/CLD-pagedesigner-console-error
Browse files Browse the repository at this point in the history
fixed console errors
  • Loading branch information
yuval-cloudinary authored Jun 25, 2024
2 parents 8b5ec52 + d436068 commit cd2f914
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
window.cname = value.cname || null;

// Cloudinary Core JS
const script = document.querySelector('script[src="'+value.CLDPDVideoPlayerJSURL+'"]');
var script = document.querySelector('script[src="'+value.CLDPDVideoPlayerJSURL+'"]');
if (script === null) {
var shrinkWrap = document.createElement('script');
shrinkWrap.src = value.CLDPDShrinkwrapJSURL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
<div class="cloudinary-video-container sfdc-component-mock sfdc-component-assets-media_library_video-mock">
<video id="${pdict.viewmodel.id}"></video>
<script>
var value = JSON.parse('<isprint value="${JSON.stringify(pdict.viewmodel)}" encoding="jsonvalue"/>');
window.players = window.players || [];
window.players.push(value);
window.cloudName = value.cloudName;
window.cname = value.cname || null;
var value = JSON.parse('<isprint value="${JSON.stringify(pdict.viewmodel)}" encoding="jsonvalue"/>');
window.players = window.players || [];
window.players.push(value);
window.cloudName = value.cloudName;
window.cname = value.cname || null;

// Check if the Cloudinary Core JS is inculded
const shrinkWrapJs = document.querySelector('script[src="'+value.CLDPDShrinkwrapJSURL+'"]');
if (shrinkWrapJs) {
shrinkWrapJs.parentNode.removeChild(shrinkWrapJs);
}
</script>
// Check if the Cloudinary Core JS is inculded
var shrinkWrapJs = document.querySelector('script[src="'+value.CLDPDShrinkwrapJSURL+'"]');
if (shrinkWrapJs) {
shrinkWrapJs.parentNode.removeChild(shrinkWrapJs);
}
</script>
</div>

0 comments on commit cd2f914

Please sign in to comment.