fix the case when srcUrl.search is undefined