diff --git a/src/extractors/root-extractor.js b/src/extractors/root-extractor.js index ca6a8805..ed531b85 100644 --- a/src/extractors/root-extractor.js +++ b/src/extractors/root-extractor.js @@ -53,7 +53,7 @@ export function select(opts) { const { selectors } = extractionOpts; - const matchingSelector = selectors.find(selector => $(selector).length === 1); + const matchingSelector = selectors.find(selector => $(selector).length === 1 && $(selector).text().trim() !== ''); if (!matchingSelector) return null;