fix: selection should not be empty

This commit is contained in:
Adam Pash 2016-09-14 13:13:26 -04:00
parent 81ed4f00ed
commit 457075889d

View File

@ -53,7 +53,7 @@ export function select(opts) {
const { selectors } = extractionOpts; 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; if (!matchingSelector) return null;