• This code
    if ( $( '#wpseo_og_default_image' ).val().length > 0 )
    causes a JS error when we are not on the FB tab but the Twitter tab.

    We can wrap the script in if ( $( '#wpseo_og_default_image' ).length ) { ... } to fix it

The topic ‘JS error’ is closed to new replies.