Skip to content

Commit

Permalink
Fix duplicate authentication presentations
Browse files Browse the repository at this point in the history
  • Loading branch information
vsanthanam committed Dec 5, 2023
1 parent 7ae0df8 commit a5bc0b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/WebAuthentication/WebAuthentication.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public struct WebAuthentication {

var isPresented: Bool = false {
didSet {
guard isPresented != oldValue else { return }
if isPresented {
start()
} else {
Expand Down Expand Up @@ -261,6 +262,9 @@ public struct WebAuthentication {

var item: Item? {
didSet {
guard item?.id != oldValue?.id else {
return
}
switch (oldValue, item) {
case (.none, .none):
break
Expand Down

0 comments on commit a5bc0b5

Please sign in to comment.