Update +page.server.js

This commit is contained in:
freearhey 2023-10-10 10:40:16 +03:00
parent c0817b638e
commit 37edcb7e45

View file

@ -37,11 +37,8 @@ export function load({ params }) {
const id = `${name}.${country}`.toLowerCase()
let channel = data.channels[id]
if (!channel) {
throw error(404, 'Not Found')
}
return {
channel: transformChannel(channel, data)
channel: channel ? transformChannel(channel, data) : null
}
}