Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1090 from lift/dw_issue_1090

Early access to S.location breaks snippet resolution
  • Loading branch information...
commit c5a97b694d170762e46f84a3f1ae5adb09014509 2 parents 33d1e34 + 598fb03
@dpp dpp authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 web/webkit/src/main/scala/net/liftweb/http/S.scala
View
5 web/webkit/src/main/scala/net/liftweb/http/S.scala
@@ -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) }
+ }
/**
Please sign in to comment.
Something went wrong with that request. Please try again.