prevent HTML output if custom field is empty [closed]

Just a simple php if to check the contents of the field before outputting markup.

<?php
if( $second_comment = get_field('second_content_block') ){
    ?>
    <div class="page-content-text-additional">
        <?php echo do_shortcode("[vr_jsp] $second_comment [/vr_jsp]"); ?>
    </div>
    <?php
}
?>

You can eliminate the need for adding the class via js using the same method.

Some friendly advice- spending a day reading the php documentation will make your life much easier 🙂