Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit 78153e9

Browse files
authored
Update WXComponentMethod.h
1 parent 8f5ebf3 commit 78153e9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ios/sdk/WeexSDK/Sources/Bridge/WXComponentMethod.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,17 @@ - (void)invoke
4949
if (!component) {
5050
WXLogError(@"component not found for ref:%@, type:%@", _componentRef, _componentName);
5151
}
52-
SEL selector = [WXComponentFactory methodWithComponentName:component.type withMethod:self.methodName];
52+
BOOL synchronous = NO;
53+
SEL selector = [WXComponentFactory methodWithComponentName:component.type withMethod:self.methodName isSync:&synchronous];
5354
NSInvocation * invocation = [self invocationWithTarget:component selector:selector];
54-
WXPerformBlockOnMainThread(^{
55+
if (synchronous) {
5556
[invocation invoke];
56-
});
57+
}
58+
else {
59+
WXPerformBlockOnMainThread(^{
60+
[invocation invoke];
61+
});
62+
}
5763
});
5864

5965

0 commit comments

Comments
 (0)