@Michael_Soprano
Your Syntax is alright.
Just that, If statement won’t work in plain JavaScript. Below is the modified version.
Let me know if this works for you.
<script>
let country;
try {
country = aep.my_org.NextFlight.country || "USA";
}
catch (error)
{
country = "Egypt"; // Fallback in case of an error
}
</script>
Thanks.