oldConfig.location can be null

If we had an update, location is not part of oldConfig. if we now do
an infra update, location is undefined.
This commit is contained in:
Girish Ramakrishnan
2015-09-15 18:08:27 -07:00
parent b4a34e6432
commit 998ac74d32

View File

@@ -684,8 +684,8 @@ function configure(app, callback) {
stopApp.bind(null, app),
deleteContainer.bind(null, app),
function (next) {
// oldConfig can be null during an infra update
if (!app.oldConfig || app.oldConfig.location === app.location) return next();
// oldConfig can be null during an infra update. location can be null when infra updated for an updated app
if (!app.oldConfig || !app.oldConfig.location || app.oldConfig.location === app.location) return next();
unregisterSubdomain(app, app.oldConfig.location, next);
},
removeOAuthProxyCredentials.bind(null, app),