Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed May 28, 2024
1 parent d8a1fa8 commit a158265
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Sources/Perception/PerceptionRegistrar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,11 @@ extension PerceptionRegistrar {
)
}
if let subject = subject as? any Observable {
open(subject)
return open(subject)
}
} else {
self.perceptionRegistrar.access(subject, keyPath: keyPath)
}
#endif
self.perceptionRegistrar.access(subject, keyPath: keyPath)
}

@_disfavoredOverload
Expand All @@ -124,12 +123,9 @@ extension PerceptionRegistrar {
)
}
return try open(subject)
} else {
return try self.perceptionRegistrar.withMutation(of: subject, keyPath: keyPath, mutation)
}
#else
return try mutation()
#endif
return try self.perceptionRegistrar.withMutation(of: subject, keyPath: keyPath, mutation)
}

@_disfavoredOverload
Expand All @@ -148,10 +144,9 @@ extension PerceptionRegistrar {
)
}
return open(subject)
} else {
return self.perceptionRegistrar.willSet(subject, keyPath: keyPath)
}
#endif
return self.perceptionRegistrar.willSet(subject, keyPath: keyPath)
}

@_disfavoredOverload
Expand All @@ -170,10 +165,9 @@ extension PerceptionRegistrar {
)
}
return open(subject)
} else {
return self.perceptionRegistrar.didSet(subject, keyPath: keyPath)
}
#endif
return self.perceptionRegistrar.didSet(subject, keyPath: keyPath)
}
}

Expand Down

0 comments on commit a158265

Please sign in to comment.