Skip to content

Commit

Permalink
Merge pull request #216 from ghiculescu/patch-3
Browse files Browse the repository at this point in the history
Log what `shouldProposeThrottledVisit` returns
  • Loading branch information
jayohms authored Mar 2, 2022
2 parents 14ad418 + 751ff8c commit 335d80f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,8 @@ class TurboSession internal constructor(
reset()
}

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

logEvent("shouldOverrideUrlLoading", "location" to location, "shouldOverride" to shouldOverride)
logEvent("shouldOverrideUrlLoading", "location" to location, "shouldOverride" to shouldOverride, "willProposeThrottledVisit" to willProposeThrottledVisit)
return shouldOverride
}

Expand Down

0 comments on commit 335d80f

Please sign in to comment.