From b94e64a4d354ed530fe909dfd651a7e9d59d64ce Mon Sep 17 00:00:00 2001 From: joncrangle <94425204+joncrangle@users.noreply.github.com> Date: Fri, 8 Dec 2023 01:37:27 -0500 Subject: [PATCH] Empty array instead of empty object in null coalesce --- handlers/playground-script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/playground-script.js b/handlers/playground-script.js index 3352243..a640b64 100644 --- a/handlers/playground-script.js +++ b/handlers/playground-script.js @@ -65,7 +65,7 @@ async function fetchPayload() { const response = await fetch("/api/modifiers"); const data = await response.json(); - Object.entries(data.result.requestmodifiers ?? {}).forEach(([_, value]) => { + Object.entries(data.result.requestmodifiers ?? []).forEach(([_, value]) => { addModifierToNinjaData( value.name, value.description, @@ -74,7 +74,7 @@ async function fetchPayload() { ); }); - Object.entries(data.result.responsemodifiers ?? {}).forEach( + Object.entries(data.result.responsemodifiers ?? []).forEach( ([_, value]) => { addModifierToNinjaData( value.name,