diff --git a/MessageThrottle.podspec b/MessageThrottle.podspec index a5c2ee8..6c9121a 100644 --- a/MessageThrottle.podspec +++ b/MessageThrottle.podspec @@ -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. diff --git a/MessageThrottle/MessageThrottle.m b/MessageThrottle/MessageThrottle.m index c0ec522..74c5448 100644 --- a/MessageThrottle/MessageThrottle.m +++ b/MessageThrottle/MessageThrottle.m @@ -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;