Skip to content

Commit

Permalink
Update Observation.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus authored Jul 30, 2024
1 parent dfdddca commit 2031332
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/Defaults/Observation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,11 @@ extension Defaults {
let compositeObservation = CompositeDefaultsObservation { _, _ in
handler()
}
keys.forEach {
compositeObservation.add(key: $0)

for key in keys {
compositeObservation.add(key: key)
}

compositeObservation.start(options: options)

return compositeObservation
Expand Down

0 comments on commit 2031332

Please sign in to comment.