Permalink
Browse files

fix bug if there is no trusted signers

  • Loading branch information...
1 parent 43d75ca commit 77e77b30704e64f24a14c89508807076cd2cd5e5 @tellnes committed Apr 26, 2012
Showing with 13 additions and 11 deletions.
  1. +13 −11 lib/index.js
View
@@ -700,19 +700,21 @@ function DistributionConfig(client, info, data) {
this.trustedSigners = [];
- if (data.TrustedSigners.Self) {
- this.trustedSigners.push('self');
- }
-
- var signers = data.TrustedSigners.AwsAccountNumber;
- if (signers) {
- if (!Array.isArray(signers)) {
- signers = [signers];
+ if (data.TrustedSigners) {
+ if (data.TrustedSigners.Self) {
+ this.trustedSigners.push('self');
}
- signers.forEach(function(signer) {
- this.trustedSigners.push(signer);
- }, this);
+ var signers = data.TrustedSigners.AwsAccountNumber;
+ if (signers) {
+ if (!Array.isArray(signers)) {
+ signers = [signers];
+ }
+
+ signers.forEach(function(signer) {
+ this.trustedSigners.push(signer);
+ }, this);
+ }
}
}
util.inherits(DistributionConfig, CFObject);

0 comments on commit 77e77b3

Please sign in to comment.