Skip to content

Commit

Permalink
Merge pull request #278 from rtCamp/fix/rtMedia-js-dependency
Browse files Browse the repository at this point in the history
Fix js script dependency error
  • Loading branch information
Utsav-Ladani authored Oct 19, 2023
2 parents ced3d8a + a6d3576 commit 5663304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/rt-transcoder-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ function rtt_enqueue_frontend_scripts() {
$file_to_use = 'public-assets/js/build/transcoder.min.js';

$file = path_join( RT_TRANSCODER_PATH, $file_to_use );
if ( file_exists( $file ) ) {
if ( file_exists( $file ) && class_exists( 'RTMedia' ) ) {
wp_enqueue_script( 'rt-transcoder-front-js', RT_TRANSCODER_URL . $file_to_use, array( 'jquery', 'rtmedia-backbone' ), filemtime( $file ), true );

$rest_url_prefix = get_site_url() . '/' . rest_get_url_prefix();
Expand Down

0 comments on commit 5663304

Please sign in to comment.