diff --git a/lib/actions/ProjectInit.js b/lib/actions/ProjectInit.js index 7173c36d5..260594939 100644 --- a/lib/actions/ProjectInit.js +++ b/lib/actions/ProjectInit.js @@ -145,7 +145,7 @@ module.exports = function(SPlugin, serverlessPath) { if (_this.evt.options.name) isName = true; // Check if project exists - if (_this.S.getProject()) { + if (_this.S.hasProject()) { // Set temp name name = _this.evt.options.name ? _this.evt.options.name : (_this.S.getProject().getName() + '-' + SUtils.generateShortId(6)).toLowerCase(); } else {