Switch to lodash get.

This commit is contained in:
William 2018-07-16 20:54:30 -07:00 committed by GitHub
parent 20401e7c3c
commit 58c8352ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -691,7 +691,7 @@ class Variables {
{ useCache: true }) // Use request cache
.then(response => BbPromise.resolve(response.Parameter.Value))
.catch((err) => {
if (err.providerError.code !== 'ParameterNotFound') {
if (_.get(err, 'providerError.code') !== 'ParameterNotFound') {
return BbPromise.reject(new this.serverless.classes.Error(err.message));
}