Skip to content

Commit e784f54

Browse files
committed
Resolve discussions
1 parent 6d849c7 commit e784f54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/app/src/app/overmind/namespaces/editor/internalActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ export const saveCode: AsyncAction<{
177177
};
178178

179179
export const updateCurrentTemplate: AsyncAction = async ({
180-
state,
181180
effects,
181+
state,
182182
}) => {
183183
try {
184184
const currentTemplate = state.editor.currentSandbox.template;
@@ -189,9 +189,9 @@ export const updateCurrentTemplate: AsyncAction = async ({
189189
// in the sandbox configuration.
190190
if (
191191
templateDefinition.isServer ||
192-
state.editor.parsedConfigurations.sandbox.parsed.template
192+
state.editor.parsedConfigurations?.sandbox?.parsed?.template
193193
) {
194-
const { parsed = {} } = state.editor.parsedConfigurations!.package!;
194+
const { parsed = {} } = state.editor.parsedConfigurations?.package || {};
195195

196196
const modulesByPath = mapValues(state.editor.modulesByPath, module => ({
197197
// No idea why this typing fails!

0 commit comments

Comments
 (0)