From 10067510f4028802db1ce0cdea2ca4258456b97e Mon Sep 17 00:00:00 2001 From: Jay Ohms Date: Mon, 16 Dec 2024 17:33:40 -0500 Subject: [PATCH] Clean up implementation --- Source/Turbo/Session/Session.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Turbo/Session/Session.swift b/Source/Turbo/Session/Session.swift index fabcdb4..71db207 100644 --- a/Source/Turbo/Session/Session.swift +++ b/Source/Turbo/Session/Session.swift @@ -259,9 +259,9 @@ extension Session: VisitableDelegate { // Navigating forward - complete navigation early. if visitable === currentVisit.visitable { - let currentVisitCompletedWithResponse = currentVisit.options.response?.responseHTML != nil && currentVisit.state == .completed + let currentVisitHasResponse = currentVisit.options.response?.responseHTML != nil - if currentVisit.state == .started || currentVisitCompletedWithResponse { + if currentVisit.state == .started || (currentVisitHasResponse && currentVisit.state == .completed) { completeNavigationForCurrentVisit() return }