Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

Fix off by one error in extracting key path string. #89

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 BlocksKit/NSObject+BlockObservation.m
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ - (void)removeObserversWithIdentifier:(NSString *)token {
[self associateValue:nil withKey:&kObserverBlocksKey];

[withIdentifier each:^(NSString *key, BKObserver *trampoline) {
NSString *keyPath = [key substringToIndex:key.length - token.length - 2];
NSString *keyPath = [key substringToIndex:key.length - token.length - 1];

if (!trampoline || ![trampoline.keyPaths containsObject:keyPath])
return;
Expand All @@ -186,4 +186,4 @@ - (void)removeAllBlockObservers {

@end

BK_MAKE_CATEGORY_LOADABLE(NSKeyValueOvserving_BlocksKit)
BK_MAKE_CATEGORY_LOADABLE(NSKeyValueOvserving_BlocksKit)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NSKeyValueO-b-vserving_BlocksKit?