Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit bfdb08f

Browse files
committed
Fix removal for cases when no new instances are started
1 parent 0bf197a commit bfdb08f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes/deploy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ const scheduleCleanup = ({username, project, existing}) => {
8383
// filter out old container that don't have new containers
8484
// that are already up and running
8585
const toRemove = existing.filter(container => {
86-
const newInstnace = running.find(runningContainer =>
86+
const newInstance = running.find(runningContainer =>
8787
util.compareNames(container.Labels['exoframe.name'], runningContainer.Labels['exoframe.name'])
8888
);
89-
return newInstnace.State === 'running' && newInstnace.Status.toLowerCase().includes('up');
89+
return newInstance && newInstance.State === 'running' && newInstance.Status.toLowerCase().includes('up');
9090
});
9191

9292
// remove old containers

0 commit comments

Comments
 (0)