make the filter selection semi-strict

This commit is contained in:
buzz-lightsnack-2007 2024-04-15 23:33:43 +08:00
parent 18f949d9bf
commit 309cdd4306

View file

@ -25,12 +25,12 @@ export default class filters {
async select(URL = window.location.href) { async select(URL = window.location.href) {
let SELECTED = await (async () => { let SELECTED = await (async () => {
// Get the filters. // Get the filters.
let filter = await search(`filters`, URL, `URL`, false, {"cloud": -1}); let filter = await search(`filters`, URL, `URL`, 0.5, {"cloud": -1});
// If there are filters, then filter the URL. // If there are filters, then filter the URL.
return filter; return filter;
})(); })();
if ((SELECTED && SELECTED != null && (typeof SELECTED).includes(`obj`)) ? (Object.keys(SELECTED)).length > 0 : false) { 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);