Skip to content

Commit a0ce4df

Browse files
committed
fixed a bug when switching to native mode
1 parent 3a2c4e4 commit a0ce4df

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/reducers/bottomReducers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@ export const toggleNative = (state: ApplicationStateInt) => {
127127
const app = components.find((e: ComponentInt) => e.id === 1);
128128
app.position.width = !state.native ? 500 : 1200;
129129
app.position.height = !state.native ? 850 : 800;
130+
app.changed = true;
130131

131132
return {
132133
...initialApplicationState,
134+
focusComponent: app,
133135
native: !state.native,
134136
components
135137
};

src/utils/componentRender.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ const componentRender = (
185185
186186
187187
interface Props {
188-
${props.map(prop => `${prop.key}: ${typeSwitcher(prop.type)}\n`)}
188+
${props.map(prop => `${prop.key}: ${typeSwitcher(prop.type)};\n`)}
189189
};
190190
191191
${

0 commit comments

Comments
 (0)