fixes two failing tests

Signed-off-by: Henrik Edegård <henrik.edegard@fortnox.se>
This commit is contained in:
Henrik Edegård
2025-11-04 13:10:39 +00:00
parent 87e597c406
commit 4918a6ffe6
@@ -233,7 +233,7 @@ export async function createRouter(
channels.push(channel.id);
}
for (const origin of channel.origins) {
for (const origin of channel.origins ?? []) {
if (!origins.includes(origin.id)) {
origins.push(origin.id);
}
@@ -287,7 +287,7 @@ export async function createRouter(
settings.channels[0] = {
...settings.channels[0],
enabled: userChannel.enabled ?? settings.channels[0].enabled,
origins: userChannel.origins,
origins: userChannel.origins ?? [],
};
}