Skip to content

Commit

Permalink
fix: --fields was broken, fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Aug 24, 2020
1 parent ebfbd6e commit 23d19c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = async (baseUrl, options = {}) => {
}

// custom fields
if (options.fields.length > 0) {
if (Object.keys(options.fields).length > 0) {
// console.log('options.fields: ', options.fields);
const newFields = Object.keys(options.fields).map(f => 'result.' + f);
fields = [...fields, ...newFields];
Expand Down

0 comments on commit 23d19c6

Please sign in to comment.