Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
remove manual set _wrappedValue since its already set in callback
Browse files Browse the repository at this point in the history
  • Loading branch information
hainayanda committed Jun 6, 2022
1 parent 33d38cd commit c9d3c99
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Pharos/Classes/Observable/Subject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ public final class Subject<Wrapped>: BindableObservable<Wrapped> {
_wrappedValue
}
set {
let oldValue = _wrappedValue
_wrappedValue = newValue
relay(
changes: Changes(old: oldValue, new: newValue, source: self),
changes: Changes(old: _wrappedValue, new: newValue, source: self),
context: PharosContext()
)
}
Expand Down

0 comments on commit c9d3c99

Please sign in to comment.