Skip to content

Commit

Permalink
Merge pull request #146 from syroegkin/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
syroegkin authored Jul 19, 2020
2 parents d027f0c + 7e28af0 commit 6c8837e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const markdownlintConfig = require('../.markdownlint.json');
function partiallyDereference(node, $refs) {
if (typeof node !== 'object') return node;
const obj = {};
for (const [key, value] of Object.entries({ ...node })) {
// Issue related to babel (I beleive) as it won't build it when just spreading
// eslint-disable-next-line prefer-object-spread
const nodeAsObject = Object.assign({}, node);
for (const [key, value] of Object.entries(nodeAsObject)) {
if (Array.isArray(value)) {
obj[key] = value.map(item => partiallyDereference(item, $refs));
} else if (key === '$ref' && !value.startsWith('#/definitions/')) {
Expand Down

0 comments on commit 6c8837e

Please sign in to comment.