From c033fd32865d5ff7d05b3080e54daa485c63e248 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sun, 12 May 2024 17:47:51 +0800 Subject: [PATCH] get the existing analysis when the current selected is empty --- scripts/data/product.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/data/product.js b/scripts/data/product.js index 3576443..0f486f5 100644 --- a/scripts/data/product.js +++ b/scripts/data/product.js @@ -47,7 +47,10 @@ export default class product { 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() {