Skip to content

Commit

Permalink
fix(ios): broken subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
garymathews authored and ewanharris committed Jun 17, 2021
1 parent 400f9de commit 8daea84
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/KrollModule.m
Expand Up @@ -79,9 +79,8 @@ - (JSValue *)binding:(NSString *)moduleID
}

// FIXME: Extract a Proxy protocol for ObjcProxy/TiProxy and place methods like boundBridge:withKrollObject: on it!
if ([module isKindOfClass:[ObjcProxy class]]) {
ObjcProxy *proxy = (ObjcProxy *)module;
return [proxy JSValueInContext:context];
if ([module respondsToSelector:@selector(JSValueInContext:)]) {
return [module JSValueInContext:context];
}
KrollObject *ko = [[self executionContext] registerProxy:module]; // This basically retains the module for the lifetime of the bridge
return [JSValue valueWithJSValueRef:[ko jsobject] inContext:context];
Expand Down

0 comments on commit 8daea84

Please sign in to comment.