Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Early access to S.location breaks snippet resolution #1090

Merged
merged 1 commit into from May 14, 2012
Jump to file or symbol
Failed to load files and symbols.
+4 −1
Split
@@ -386,7 +386,10 @@ trait S extends HasParams with Loggable {
private[http] object CurrentLocation extends RequestVar[Box[sitemap.Loc[_]]](request.flatMap(_.location))
- def location: Box[sitemap.Loc[_]] = CurrentLocation.is
+ def location: Box[sitemap.Loc[_]] = CurrentLocation.is or {
+ //try again in case CurrentLocation was accessed before the request was available
+ request flatMap { r => CurrentLocation(r.location) }
+ }
/**