From 1461bc54df96e041e9f311c2f21ba8362090eef4 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 13 May 2024 16:06:21 +0800 Subject: [PATCH] do not remove what's already null --- scripts/secretariat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/secretariat.js b/scripts/secretariat.js index 996ae75..945c68f 100644 --- a/scripts/secretariat.js +++ b/scripts/secretariat.js @@ -264,7 +264,7 @@ class global { // Move the existing data into a new object to help in identifying. DATA = {"all": DATA}; - if ((((typeof (DATA[`all`])).includes(`obj`) && !Array.isArray(DATA[`all`])) ? Object.keys(DATA[`all`]) : false) ? Object.hasOwn(DATA[`all`], PATH[PATH.length - 1]) : false) { + if ((((typeof (DATA[`all`])).includes(`obj`) && !Array.isArray(DATA[`all`]) && DATA[`all`] != null) ? Object.keys(DATA[`all`]) : false) ? Object.hasOwn(DATA[`all`], PATH[PATH.length - 1]) : false) { DATA[`modified`] = DATA[`all`]; delete DATA[`modified`][PATH[PATH.length - 1]];