From fc05e387fcd49aea3be7b87c636a6dc30eece899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C5=A0vara?= Date: Mon, 4 Mar 2024 17:59:26 +0100 Subject: [PATCH] Fix typo. --- Source/Session/Session.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Session/Session.swift b/Source/Session/Session.swift index 34fcdda..a464d0a 100644 --- a/Source/Session/Session.swift +++ b/Source/Session/Session.swift @@ -35,7 +35,7 @@ public class Session: NSObject { private var currentVisit: Visit? private var topmostVisit: Visit? - private var previosVisit: Visit? + private var previousVisit: Visit? /// The topmost visitable is the visitable that has most recently completed a visit public var topmostVisitable: Visitable? { @@ -216,7 +216,7 @@ extension Session: VisitableDelegate { public func visitableViewWillAppear(_ visitable: Visitable) { defer { /// Nilling out the previous visit here prevents `double-snapshotting` for web -> web visits. - previosVisit = nil + previousVisit = nil } guard let topmostVisit = self.topmostVisit, let currentVisit = self.currentVisit else { return } @@ -234,7 +234,7 @@ extension Session: VisitableDelegate { } else if visitable !== topmostVisit.visitable { // Navigating backward from a web view screen to a web view screen. visit(visitable, action: .restore) - } else if visitable === previosVisit?.visitable { + } else if visitable === previousVisit?.visitable { // Navigating backward from a native to a web view screen. visit(visitable, action: .restore) } @@ -254,11 +254,11 @@ extension Session: VisitableDelegate { } public func visitableViewWillDisappear(_ visitable: Visitable) { - previosVisit = topmostVisit + previousVisit = topmostVisit } public func visitableViewDidDisappear(_ visitable: Visitable) { - previosVisit?.cacheSnapshot() + previousVisit?.cacheSnapshot() deactivateVisitable(visitable) }