Skip to content

Commit

Permalink
fix(cli): fix traverse function when called from CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Dec 20, 2019
1 parent ecebdb6 commit f211375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/traverseSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* governing permissions and limitations under the License.
*/

const { list } = require('ferrum');
const { parent } = require('./symbols');

function reducer({ seen, ids }, schema) {
Expand All @@ -36,7 +37,7 @@ function reducer({ seen, ids }, schema) {
* @param {Schema} node
*/
function traverse(schemas) {
return Array.from(schemas.reduce(reducer, { seen: new Set(), ids: [] }).seen);
return Array.from(list(schemas).reduce(reducer, { seen: new Set(), ids: [] }).seen);
}

module.exports = traverse;

0 comments on commit f211375

Please sign in to comment.