Added back check in JS for empty or default URL.