iOS:fix crash when source is nil

This commit is contained in:
pengfei.zhou 2020-02-26 17:17:09 +08:00 committed by osborn
parent f7f378f988
commit b1cd69437a

View File

@ -188,7 +188,7 @@ - (NSString *)packageModuleScript:(NSString *)moduleName content:(NSString *)con
- (void)prepareContext:(NSString *)contextId script:(NSString *)script source:(NSString *)source {
[self.jsExecutor loadJSScript:[self packageContextScript:contextId content:script]
source:[@"Context://" stringByAppendingString:source]];
source:[@"Context://" stringByAppendingString:source ?: contextId]];
}
- (void)destroyContext:(NSString *)contextId {