I created my own slideshow section which loads in videos and i have a script running that prevents videos from loading unless they are made for the right screen size. i noticed that if i have a slideshow that doesn’t have a video link, the script still runs. i tried putting if statements or unless but it doesn’t work i can’t inclose javascript in nested tags.
Is there a way to make an if statement in javascript to just return if {% block.settings.mobile_video_url == blank %}?
please share the screenshot where the issue created and where to put conditional operator in your code?
So in the first image you can see the unless statement that i made, but that doesn’t work unfortunately. if i put the unless statement outside of the javascript tag then i get the error in my console that you can see in image #2 let me know if you need more information

what im looking for is a way in javascript maybe to replicate what i was trying to do so that its natively javascript with minimal liquid. assuming liquid will only be used to reference the block setting