Skip to content

Commit

Permalink
fix for #41. TypeError: joinList.filter is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobsson committed Jul 15, 2022
1 parent 523fefb commit 9419b56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/JsonUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ function createPseudoResources(template, current) {
current = current || template.Resources;
for (var k in current) {
if (current[k] && current[k]["Fn::Join"]) {
const joinList = current[k]["Fn::Join"][1];
let joinList = current[k]["Fn::Join"][1];
if (!Array.isArray(joinList)) {
joinList = [joinList];
}
if (
joinList.filter(
(p) => typeof p === "object" && (!p.Ref || !p.Ref.startsWith("AWS::"))
Expand Down

0 comments on commit 9419b56

Please sign in to comment.