Fix undefined error when urlState options is null
Merge pull request #1736 from kdeloach/topic/urlstate-undefined

Fix undefined error when urlState options is null