move to sveltekit 2, fix 404 page returning 500
This commit is contained in:
@@ -43,7 +43,7 @@ if (dev) {
|
||||
export function load({ params }) {
|
||||
const result = getStreamInfo(params.stream_id);
|
||||
if (result === null) {
|
||||
throw error(404);
|
||||
error(404);
|
||||
}
|
||||
|
||||
if (dev) {
|
||||
|
||||
@@ -13,7 +13,7 @@ if (process.env.NODE_ENV === 'development') {
|
||||
const jsonString = fs.readFileSync(filePath, 'utf8');
|
||||
return json(jsonString);
|
||||
} else {
|
||||
throw error(404);
|
||||
error(404);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user