diff --git a/Android/doric/src/main/java/pub/doric/DoricContext.java b/Android/doric/src/main/java/pub/doric/DoricContext.java index ab791f14..09d7b0d2 100644 --- a/Android/doric/src/main/java/pub/doric/DoricContext.java +++ b/Android/doric/src/main/java/pub/doric/DoricContext.java @@ -161,6 +161,7 @@ public class DoricContext { public void reload(String script) { this.script = script; + this.mRootNode.setId(""); getDriver().createContext(mContextId, script, source); callEntity(DoricConstant.DORIC_ENTITY_INIT, this.initParams); } diff --git a/iOS/Pod/Classes/DoricContext.m b/iOS/Pod/Classes/DoricContext.m index 09e946b6..d675a141 100644 --- a/iOS/Pod/Classes/DoricContext.m +++ b/iOS/Pod/Classes/DoricContext.m @@ -82,6 +82,7 @@ - (void)initContextWithWidth:(CGFloat)width height:(CGFloat)height { } - (void)reload:(NSString *)script { + self.rootNode.viewId = nil; self.script = script; [self.driver createContext:self.contextId script:script source:self.source]; [self callEntity:DORIC_ENTITY_INIT, self.initialParams, nil];