Skip to content

Commit f230c79

Browse files
author
Roy Hui
committed
minor fixes
added missing semicolon use lodash to avoid errors
1 parent 8e45867 commit f230c79

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

lib/logs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ module.exports = {
5555
orderBy: 'LastEventTime',
5656
};
5757

58-
let aliasGetAliasFunctionVersion
58+
let aliasGetAliasFunctionVersion;
5959
// Check if --version is specified
6060
if (this._options.version) {
61-
aliasGetAliasFunctionVersion = BbPromise.resolve(this._options.version)
61+
aliasGetAliasFunctionVersion = BbPromise.resolve(this._options.version);
6262
} else {
63-
aliasGetAliasFunctionVersion = this.aliasGetAliasLatestFunctionVersionByFunctionName(this._alias, this._lambdaName)
63+
aliasGetAliasFunctionVersion = this.aliasGetAliasLatestFunctionVersionByFunctionName(this._alias, this._lambdaName);
6464
}
6565
// Get currently deployed function version for the alias to
6666
// setup the stream filter correctly
@@ -125,7 +125,7 @@ module.exports = {
125125
},
126126

127127
functionLogsShowLogs(logStreamNames) {
128-
if (logStreamNames.length === 0) {
128+
if (_.isEmpty(logStreamNames)) {
129129
return BbPromise.reject(new this.serverless.classes
130130
.Error('No existing streams for the latest version of function alias. If you want to view logs of a specific function version, please use --version to specify'));
131131
}

lib/stackInformation.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ module.exports = {
187187
{ FunctionName: functionName, Name: aliasName },
188188
this._options.stage,
189189
this._options.region)
190-
.then(result => {
191-
return result.FunctionVersion
192-
})
190+
.then(result => _.get(result, 'FunctionVersion', null));
193191
},
194192

195193
};

0 commit comments

Comments
 (0)