Reading in the pointer should process in array format

This commit is contained in:
buzz-lightsnack-2007 2024-05-08 23:56:17 +08:00
parent 1e8cae5115
commit 53b6ca73c8

View file

@ -46,14 +46,16 @@ class pointer {
@param {string} name the property to read @param {string} name the property to read
*/ */
static async read(name) { static async read(name) {
let RETURN = ((name) let NAME = (Array.isArray(name)) ? name : ((name) ? name.trim().split(`,`) : null);
? (!(name.trim().includes(`URL`))
let RETURN = ((NAME)
? (!(NAME[0].includes(`URL`))
? await global.read([`last`]) ? await global.read([`last`])
: true) : true)
: false) : false)
? global.read((name.trim().includes(`URL`)) ? global.read((NAME[0].includes(`URL`))
? [`last`] ? [`last`]
: [`sites`, await global.read([`last`]), ...((Array.isArray(name)) ? name : name.trim().split(`,`))]) : [`sites`, await global.read([`last`]), ...NAME])
: null; : null;
return(RETURN); return(RETURN);
} }