fix stage create

This commit is contained in:
Eslam λ Hefnawy 2015-12-15 12:03:28 +02:00 committed by Eslam A. Hefnawy
parent 11b908cfee
commit b71841cfc9

View File

@ -271,7 +271,7 @@ class ServerlessPlugin {
if (region) return BbPromise.resolve(region);
// If stage has one region, skip prompt and return that instead
if (_this.S._projectJson.stages[stage].length === 1 && addAllRegions) {
if (stage && _this.S._projectJson.stages[stage].length === 1 && addAllRegions) {
return BbPromise.resolve(_this.S._projectJson.stages[stage][0].region);
}