saymedia / angularjs-server

Specialized server for AngularJS sites
MIT License
247 stars 49 forks source link

Mimic the behavior of UrlResolve #20

Closed ant0ine closed 9 years ago

ant0ine commented 9 years ago

Angular UrlResovle that is using the DOM to parse the URL has a certain behavior to handle the value null. It results in the URI '/null'

Mimic that behavior here instead of dying with:

TypeError: Parameter 'url' must be a string, not object at Url.parse (url.js:118:11) at urlParse (url.js:112:5) at Url.resolve (url.js:406:29) at Object.urlResolve as resolve at sanitizeUri (/Users/aimbert/devel/phoenix/node_modules/angularjs-server/lib/ngoverrides.js:589:45)