update the URL record only when it exists

This commit is contained in:
buzz-lightsnack-2007 2024-05-09 11:40:56 +08:00
parent 2ca43d5995
commit 35663a3ed7

View file

@ -32,7 +32,10 @@ class Page_Results extends Page {
*/
async update(override = false) {
// Set the reference website when overriding or unset.
if (override || !this[`ref`]) {this[`ref`] = await global.read([`last`])};
if (override || !this[`ref`]) {
let RECORD = await global.read([`last`]);
(RECORD) ? this[`ref`] = RECORD : false;
};
if (this[`ref`]) {
// Get all the data.