Fix [Sentry] ERROR: url is undefined

stable
David Barragán Merino 2014-11-04 13:30:31 +01:00
parent 77a6d7d49a
commit 0769c13c97
1 changed files with 4 additions and 4 deletions

View File

@ -44,10 +44,10 @@ class NavigationUrlsService extends taiga.Service
return url.replace(/(:\w+)/g, replacer) return url.replace(/(:\w+)/g, replacer)
resolve: (name, ctx) -> resolve: (name, ctx) ->
if ctx url = @.urls[name]
return @.formatUrl(@.urls[name], ctx) return "" if not url
return @.urls[name] return @.formatUrl(url, ctx) if ctx
return url
module.service("$tgNavUrls", NavigationUrlsService) module.service("$tgNavUrls", NavigationUrlsService)