Deep-clone so modifying credentials in method does not affect original credentials.

This commit is contained in:
exoego 2019-01-04 21:00:59 +09:00
parent 337eb79b61
commit d74c0bb679

View File

@ -226,7 +226,7 @@ class AwsProvider {
*/
request(service, method, params, options) {
const that = this;
const credentials = that.getCredentials();
const credentials = _.cloneDeep(that.getCredentials());
// Make sure options is an object (honors wrong calls of request)
const requestOptions = _.isObject(options) ? options : {};
const shouldCache = _.get(requestOptions, 'useCache', false);