Skip to content

Commit 236d92c

Browse files
Check for email first then userid
1 parent 9057728 commit 236d92c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

swift-sdk/Internal/IterableAPIInternal.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ final class IterableAPIInternal : NSObject, PushTrackerProtocol {
212212
AnyHashable.ITBL_KEY_NEW_EMAIL: newEmail
213213
]
214214

215-
if let userId = userId {
216-
args[AnyHashable.ITBL_KEY_CURRENT_USER_ID] = userId
217-
} else if let email = email {
215+
if let email = email {
218216
args[AnyHashable.ITBL_KEY_CURRENT_EMAIL] = email
217+
} else if let userId = userId {
218+
args[AnyHashable.ITBL_KEY_CURRENT_USER_ID] = userId
219219
} else {
220220
ITBError("Both email and userId are nil")
221221
onFailure?("Both email and userId are nil", nil)

0 commit comments

Comments
 (0)