Skip to content

Commit

Permalink
fix: select extended types before content (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
touchRED authored Mar 15, 2023
1 parent 2dd3ce6 commit e8ba7ec
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/extractors/root-extractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ const RootExtractor = {
content,
};
}
let extendedResults = {};
if (extractor.extend) {
extendedResults = selectExtendedTypes(extractor.extend, opts);
}
const title = extractResult({ ...opts, type: 'title' });
const date_published = extractResult({ ...opts, type: 'date_published' });
const author = extractResult({ ...opts, type: 'author' });
Expand All @@ -247,11 +251,6 @@ const RootExtractor = {
type: 'url_and_domain',
}) || { url: null, domain: null };

let extendedResults = {};
if (extractor.extend) {
extendedResults = selectExtendedTypes(extractor.extend, opts);
}

return {
title,
content,
Expand Down

0 comments on commit e8ba7ec

Please sign in to comment.