Skip to content

Commit 0fe655d

Browse files
authored
Merge pull request #6 from nils2504/bug-fix-for-1.3.0
Bug fix for 1.3.0
2 parents abcac57 + e8068d3 commit 0fe655d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
.idea

lib/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ class ServerlessAWSPseudoParameters {
2424

2525
// loop through all resources, and check all (string) properties for any #{AWS::}
2626
// reference. If found, replace the value with an Fn::Sub reference
27-
Object.keys(resources).forEach(identifier => replaceChildNodes(resources[identifier].Properties, identifier));
27+
Object.keys(resources).forEach(identifier => {
28+
if ("Properties" in resources[identifier]) {
29+
replaceChildNodes(resources[identifier].Properties, identifier)
30+
}
31+
});
2832

2933
function isDict(v) {
3034
return typeof v === 'object' && v !== null && !(v instanceof Array) && !(v instanceof Date);

0 commit comments

Comments
 (0)