get the existing analysis when the current selected is empty

This commit is contained in:
buzz-lightsnack-2007 2024-05-12 17:47:51 +08:00
parent 55dfe9f969
commit c033fd3286

View file

@ -47,7 +47,10 @@ export default class product {
this.status[`update`] = !(await (compare([`sites`, this.URL, `snip`], this.snip))); this.status[`update`] = !(await (compare([`sites`, this.URL, `snip`], this.snip)));
}; };
if (!this.status.update && Object.hasOwn(this.status, `update`)) {this.analysis = await global.read([`sites`, this.URL, `analysis`]);}; if ((!this.status.update && Object.hasOwn(this.status, `update`)) && !this.analysis) {
let DATA = await global.read([`sites`, this.URL, `analysis`]);
(DATA) ? this.analysis = DATA : false;
};
} }
async save() { async save() {