Set blank url if range is empty

Move setting url to blank string outside of loop in case if range is empty array. In case when adapt.js is not configured properly yet it helps to avoid requests to .../undefined address, which often lead to application server routing error.