Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Repeat/Debouncer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ open class Debouncer {
/// Multiple calls will ignore the older calls and overwrite the firing time.
public func call() {
if self.timer == nil {
self.timer = Repeater.once(after: self.delay, { _ in
guard let callback = self.callback else {
self.timer = Repeater.once(after: self.delay, { [weak self] _ in
guard let callback = self?.callback else {
debugPrint("Debouncer fired but callback not set.")
return
}
Expand Down