remove unnecessary checking in SELECTED

This commit is contained in:
buzz-lightsnack-2007 2024-05-11 22:48:26 +08:00
parent 634c0b48b0
commit af996cfc1d

View file

@ -33,15 +33,9 @@ export default class filters {
}; };
if (URL) { if (URL) {
let SELECTED = await (async () => { let SELECTED = await global.search(`filters`, URL, `URL`, 0.5, {"cloud": -1});
// Get the filters.
let filter = await global.search(`filters`, URL, `URL`, 0.5, {"cloud": -1});
// If there are filters, then filter the URL. if ((SELECTED && SELECTED != null && (typeof SELECTED).includes(`obj`)) ? (Object.keys(SELECTED)).length : false) {
return filter;
})();
if ((SELECTED && SELECTED != null && (typeof SELECTED).includes(`obj`)) ? (Object.keys(SELECTED)).length > 0 : false) {
this.one = (Object.entries(SELECTED))[0][1]; this.one = (Object.entries(SELECTED))[0][1];
return (this.one); return (this.one);
}; };