Skip to content

Commit ff15a3e

Browse files
authored
fixes issue affecting list of listeners (parse-community#1182)
1 parent 37aee69 commit ff15a3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Parse/Internal/PFReachability.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ - (void)removeListener:(id<PFReachabilityListener>)listener {
135135
@strongify(listener);
136136
[_listenersArray filterUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) {
137137
id weakObject = [evaluatedObject weakObject];
138-
return (weakObject == nil || weakObject == listener);
138+
return !(weakObject == nil || weakObject == listener);
139139
}]];
140140
});
141141
}
@@ -156,7 +156,7 @@ - (void)_notifyAllListeners {
156156
}
157157

158158
dispatch_barrier_async(_synchronizationQueue, ^{
159-
[_listenersArray filterUsingPredicate:[NSPredicate predicateWithFormat:@"SELf.weakObject != nil"]];
159+
[_listenersArray filterUsingPredicate:[NSPredicate predicateWithFormat:@"SELF.weakObject != nil"]];
160160
});
161161
});
162162
}

0 commit comments

Comments
 (0)