Skip to content

Commit

Permalink
fix: 🐛 fix issue when non of the paths in template appears in response
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinxin90 committed Mar 29, 2021
1 parent 5cee59c commit 08167b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/json_transform/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export const transformComplexObject = (json_doc: JSONDoc, template: BaseTemplate
trimmed_json_doc = json_doc;
trimmed_template = template;
}
if (typeof trimmed_json_doc === "undefined") {
return {}
}
if (Array.isArray(trimmed_json_doc)) {
new_doc = transformArrayOfSimpleObject(trimmed_json_doc, trimmed_template)
} else {
Expand Down

0 comments on commit 08167b8

Please sign in to comment.