Skip to content

Commit

Permalink
fix: null check
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobsson committed Dec 23, 2020
1 parent 7e56805 commit a2d8372
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mhlabs/cfn-diagram",
"version": "1.1.11",
"version": "1.1.12",
"description": "CLI tool to visualise CloudFormation templates as draw.io or HTML diagrams",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion resources/JsonUtil.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function createPseudoResources(template, current) {
current = current || template.Resources;
for (var k in current) {
if (current[k]["Fn::Join"]) {
if (current[k] && current[k]["Fn::Join"]) {
const joinList = current[k]["Fn::Join"][1]
current[k] = (Array.isArray(joinList) ? joinList : [joinList]).join(current[k]["Fn::Join"][0]);
}
Expand Down

0 comments on commit a2d8372

Please sign in to comment.