android:DoricPanelFragment fix npe

This commit is contained in:
pengfei.zhou 2020-05-26 11:09:19 +08:00 committed by osborn
parent 26d0a38357
commit edb355da80

View File

@ -64,10 +64,14 @@ public class DoricPanelFragment extends Fragment implements IDoricNavigator {
loadJSBundle(); loadJSBundle();
} else { } else {
DoricPanel panel = view.findViewById(R.id.doric_panel); DoricPanel panel = view.findViewById(R.id.doric_panel);
if (doricPanel != view.findViewById(R.id.doric_panel)) { if (doricPanel != panel) {
DoricContext context = doricPanel.getDoricContext(); DoricContext doricContext = doricPanel.getDoricContext();
panel.config(context);
doricPanel = panel; doricPanel = panel;
if (doricContext == null) {
loadJSBundle();
} else {
panel.config(doricContext);
}
} }
} }
} }