Skip to content

Commit

Permalink
Fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
yulingtianxia committed Jan 26, 2019
1 parent 4d9f47a commit ae8ffbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MessageThrottle.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MessageThrottle"
s.version = "1.3.1"
s.version = "1.3.2"
s.summary = "A lightweight Objective-C message throttle and debounce library."
s.description = <<-DESC
MessageThrottle is a lightweight, simple library for controlling frequency of forwarding Objective-C messages. You can choose to control existing methods per instance or per class. It's an implementation of function throttle/debounce developed with Objective-C runtime.
Expand Down
8 changes: 4 additions & 4 deletions MessageThrottle/MessageThrottle.m
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,13 @@ - (BOOL)applyRule:(MTRule *)rule
__block BOOL shouldApply = YES;
if (mt_checkRuleValid(rule)) {
for (id target in [[self.targetSELs keyEnumerator] allObjects]) {
if (target == rule.target) {
shouldApply = NO;
continue;
}
NSMutableSet *selectors = [self.targetSELs objectForKey:target];
NSString *selectorName = NSStringFromSelector(rule.selector);
if ([selectors containsObject:selectorName]) {
if (target == rule.target) {
shouldApply = NO;
continue;
}
if (mt_object_isClass(rule.target) && mt_object_isClass(target)) {
Class clsA = rule.target;
Class clsB = target;
Expand Down

0 comments on commit ae8ffbc

Please sign in to comment.