Fixed qu all breaking if no selectors are passed. Fixed old Kelly Madison scene URLs.

This commit is contained in:
DebaucheryLibrarian
2024-12-30 02:44:35 +01:00
parent 96a5e5b693
commit df941b0021
3 changed files with 34 additions and 14 deletions

View File

@@ -142,6 +142,10 @@ function all(context, selectors, attrArg, applyTrim = true) {
const attr = attrArg === true ? 'textContent' : attrArg;
const elements = [].concat(selectors).reduce((acc, selector) => acc || getElements(context, selector), null);
if (!Array.isArray(elements)) {
return [];
}
if (attr) {
return elements.map((el) => q(el, null, attr, applyTrim));
}