Skip to content

Commit bf466e8

Browse files
authored
Fix the stub for layerActionForKey: to let CA continue the search (#1441)
* Fix the stub for layerActionForKey: to let CA continue the search * Kick CI
1 parent d970dc3 commit bf466e8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Source/ASDisplayNode.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ BOOL ASDisplayNodeNeedsSpecialPropertiesHandling(BOOL isSynchronous, BOOL isLaye
106106
void StubImplementationWithNoArgs(id receiver, SEL _cmd) {}
107107
void StubImplementationWithSizeRange(id receiver, SEL _cmd, ASSizeRange sr) {}
108108
void StubImplementationWithTwoInterfaceStates(id receiver, SEL _cmd, ASInterfaceState s0, ASInterfaceState s1) {}
109-
id StubLayerActionImplementation(id receiver, SEL _cmd, NSString *key) { return (id)kCFNull; }
109+
110+
/// Returning nil here won't trigger unwanted default actions, because we override
111+
/// +defaultActionForKey: to return kCFNull.
112+
id StubLayerActionImplementation(id receiver, SEL _cmd, NSString *key) { return nil; }
110113

111114
/**
112115
* Returns ASDisplayNodeFlags for the given class/instance. instance MAY BE NIL.

0 commit comments

Comments
 (0)