diff --git a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java index eca7af50bc..0d8696ba31 100644 --- a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java +++ b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java @@ -38,6 +38,9 @@ public class TemplateTool { private static Listener switchListener = new Listener() { @Override public void on(Event event, JTemplate jTemplate) { + if (!(jTemplate instanceof JForm)) { + return; + } JFormType currentType = JFormType.OLD_TYPE; if (AdaptiveSwitchUtil.isSwitchJFromIng()) { currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE;