Skip to content

Commit 9bbc3d9

Browse files
committed
Check if model is available when renaming it
Fixes codesandbox#3455
1 parent 204160f commit 9bbc3d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/app/src/app/overmind/effects/vscode/ModelsHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class ModelsHandler {
129129

130130
return Promise.all(
131131
Object.keys(this.moduleModels).map(async path => {
132-
if (oldModelPath === path) {
132+
if (oldModelPath === path && this.moduleModels[path].model) {
133133
const model = await this.moduleModels[path].model;
134134

135135
// This runs remove/add automatically

0 commit comments

Comments
 (0)