fix 500 on room create
This commit is contained in:
parent
4edc443fdb
commit
bad3d07e6f
2 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ export class Room {
|
|||
owner: this.host.username,
|
||||
port: parseInt(parsed[1]),
|
||||
game: globalData.games.find(
|
||||
(g) => g.name.toUpperCase().trim() === config.gameName.toUpperCase().trim(),
|
||||
(g) => g.name?.toUpperCase().trim() === config.gameName?.toUpperCase().trim(),
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ export async function load({ request }) {
|
|||
.split(".md")
|
||||
.slice(0, -1)
|
||||
.join(".md")
|
||||
.replace(/^\w/gm, (c) => c.toUpperCase());
|
||||
.replace(/^\w/gm, (c) => c?.toUpperCase());
|
||||
// remove title from contents
|
||||
return {
|
||||
contents: contents.split("\n").slice(1).join("\n"),
|
||||
|
|
Loading…
Reference in a new issue