feat:protect when build set navbar's view
This commit is contained in:
parent
e0ef6d7c59
commit
b169f581d3
@ -65,7 +65,7 @@ public class ShaderPlugin extends DoricJavaPlugin {
|
|||||||
}
|
}
|
||||||
String viewId = jsObject.getProperty("id").asString().value();
|
String viewId = jsObject.getProperty("id").asString().value();
|
||||||
RootNode rootNode = getDoricContext().getRootNode();
|
RootNode rootNode = getDoricContext().getRootNode();
|
||||||
if (TextUtils.isEmpty(rootNode.getId())) {
|
if (TextUtils.isEmpty(rootNode.getId()) && "Root".equals(jsObject.getProperty("type").asString().value())) {
|
||||||
rootNode.setId(viewId);
|
rootNode.setId(viewId);
|
||||||
rootNode.blend(jsObject.getProperty("props").asObject());
|
rootNode.blend(jsObject.getProperty("props").asObject());
|
||||||
} else {
|
} else {
|
||||||
|
@ -38,7 +38,7 @@ - (void)render:(NSDictionary *)argument withPromise:(DoricPromise *)promise {
|
|||||||
|
|
||||||
NSString *viewId = argument[@"id"];
|
NSString *viewId = argument[@"id"];
|
||||||
|
|
||||||
if (self.doricContext.rootNode.viewId == nil) {
|
if (self.doricContext.rootNode.viewId == nil && [@"Root" isEqualToString:argument[@"type"]]) {
|
||||||
self.doricContext.rootNode.viewId = viewId;
|
self.doricContext.rootNode.viewId = viewId;
|
||||||
[self.doricContext.rootNode blend:argument[@"props"]];
|
[self.doricContext.rootNode blend:argument[@"props"]];
|
||||||
[self.doricContext.rootNode requestLayout];
|
[self.doricContext.rootNode requestLayout];
|
||||||
|
Reference in New Issue
Block a user