[ASTextNode] One more check variables before calling delegate method #trivial (#922)

This commit is contained in:
Flatout73 2018-07-21 01:15:50 +03:00 committed by Huy Nguyen
parent 736e200407
commit 4b5b90f7a0

View File

@ -657,7 +657,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ];
}
// Ask our delegate if a long-press on an attribute is relevant
if ([_delegate respondsToSelector:@selector(textNode:shouldLongPressLinkAttribute:value:atPoint:)]) {
if ([self _pendingLinkTap] && [_delegate respondsToSelector:@selector(textNode:shouldLongPressLinkAttribute:value:atPoint:)]) {
return [_delegate textNode:self
shouldLongPressLinkAttribute:_highlightedLinkAttributeName
value:_highlightedLinkAttributeValue