Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix issue causing config to update other service configs

  • Loading branch information...
commit 3fcf2e8371cff277fd85829d12035b187e7a9bb9 1 parent e11769a
Loren Segal lsegal authored
Showing with 10 additions and 7 deletions.
  1. +10 −7 lib/resource_waiter.js
17 lib/resource_waiter.js
View
@@ -32,6 +32,7 @@ AWS.ResourceWaiter = inherit({
constructor: function constructor(service, state) {
this.service = service;
this.state = state;
+ this.config = {};
if (typeof this.state === 'object') {
AWS.util.each.call(this, this.state, function (key, value) {
@@ -52,7 +53,7 @@ AWS.ResourceWaiter = inherit({
expectedValue: null,
- config: {},
+ config: null,
/**
* @return [AWS.Request]
@@ -186,11 +187,13 @@ AWS.ResourceWaiter = inherit({
AWS.util.update(config, this.service.api.waiters[state]);
// inherit acceptor data
- config.successType = config.successType || config.acceptorType;
- config.successPath = config.successPath || config.acceptorPath;
- config.successValue = config.successValue || config.acceptorValue;
- config.failureType = config.failureType || config.acceptorType;
- config.failurePath = config.failurePath || config.acceptorPath;
- config.failureValue = config.failureValue || config.acceptorValue;
+ (function () { // anonymous function to avoid max complexity count
+ config.successType = config.successType || config.acceptorType;
+ config.successPath = config.successPath || config.acceptorPath;
+ config.successValue = config.successValue || config.acceptorValue;
+ config.failureType = config.failureType || config.acceptorType;
+ config.failurePath = config.failurePath || config.acceptorPath;
+ config.failureValue = config.failureValue || config.acceptorValue;
+ })();
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.