Skip to content

Commit

Permalink
fix Swift backwards compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jul 20, 2024
1 parent f67e7d1 commit 7f145c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/ParseSwift/Protocols/ParseHookTriggerable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public extension ParseHookTriggerable {
case .objectType(let parseObject):
switch trigger {
case .beforeLogin, .afterLogin, .afterLogout:
guard parseObject is (any ParseUser.Type) else {
// BAKER: Handled this way to preserve Swift backwards compatability.
guard parseObject.className == BaseParseUser.className else {
throw notSupportedError
}
case .beforeSave, .afterSave, .beforeDelete,
Expand All @@ -139,7 +140,8 @@ public extension ParseHookTriggerable {
case .object(let parseObject):
switch trigger {
case .beforeLogin, .afterLogin, .afterLogout:
guard parseObject is (any ParseUser) else {
// BAKER: Handled this way to preserve Swifg backwards compatability.
guard parseObject.className == BaseParseUser.className else {
throw notSupportedError
}
case .beforeSave, .afterSave, .beforeDelete,
Expand Down

0 comments on commit 7f145c1

Please sign in to comment.