Skip to content

Commit

Permalink
Add clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Dec 17, 2024
1 parent 1006751 commit fc93999
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Turbo/Session/Session.swift
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ extension Session: VisitableDelegate {
if visitable === currentVisit.visitable {
let currentVisitHasResponse = currentVisit.options.response?.responseHTML != nil

/// Most visits will be `.started` here, but form submission redirects containing `response.responseHTML` in
/// the modal context while navigating back to the default context will already be `.completed` at this point.
if currentVisit.state == .started || (currentVisitHasResponse && currentVisit.state == .completed) {
completeNavigationForCurrentVisit()
return
Expand Down

0 comments on commit fc93999

Please sign in to comment.