Skip to content

Commit 335d80f

Browse files
authored
Merge pull request #216 from ghiculescu/patch-3
Log what `shouldProposeThrottledVisit` returns
2 parents 14ad418 + 751ff8c commit 335d80f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSession.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,8 @@ class TurboSession internal constructor(
668668
reset()
669669
}
670670

671-
if (shouldOverride && shouldProposeThrottledVisit()) {
671+
val willProposeThrottledVisit = shouldProposeThrottledVisit()
672+
if (shouldOverride && willProposeThrottledVisit) {
672673
// Replace the cold boot destination on a redirect
673674
// since the original url isn't visitable.
674675
val options = when (isColdBootRedirect) {
@@ -678,7 +679,7 @@ class TurboSession internal constructor(
678679
visitProposedToLocation(location, options.toJson())
679680
}
680681

681-
logEvent("shouldOverrideUrlLoading", "location" to location, "shouldOverride" to shouldOverride)
682+
logEvent("shouldOverrideUrlLoading", "location" to location, "shouldOverride" to shouldOverride, "willProposeThrottledVisit" to willProposeThrottledVisit)
682683
return shouldOverride
683684
}
684685

0 commit comments

Comments
 (0)