Fix error Cannot call method 'indexOf' of undefined - for when repository object doesn't have a URL property.