Empty array instead of empty object in null coalesce
This commit is contained in:
@@ -65,7 +65,7 @@ async function fetchPayload() {
|
|||||||
const response = await fetch("/api/modifiers");
|
const response = await fetch("/api/modifiers");
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
Object.entries(data.result.requestmodifiers ?? {}).forEach(([_, value]) => {
|
Object.entries(data.result.requestmodifiers ?? []).forEach(([_, value]) => {
|
||||||
addModifierToNinjaData(
|
addModifierToNinjaData(
|
||||||
value.name,
|
value.name,
|
||||||
value.description,
|
value.description,
|
||||||
@@ -74,7 +74,7 @@ async function fetchPayload() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.entries(data.result.responsemodifiers ?? {}).forEach(
|
Object.entries(data.result.responsemodifiers ?? []).forEach(
|
||||||
([_, value]) => {
|
([_, value]) => {
|
||||||
addModifierToNinjaData(
|
addModifierToNinjaData(
|
||||||
value.name,
|
value.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user