Skip to content

Commit 12610de

Browse files
authored
games: Fix 'undefined' issue with empty ctx
1 parent 9793554 commit 12610de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ps/commands/games/core.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export const command: PSCommand[] = Object.entries(Games).map(([_gameId, Game]):
127127

128128
function getGame(feed: string, searchCtx: SearchContext, roomCtx: RoomContext): { game: CommonGame; ctx: string } {
129129
const { $T } = roomCtx;
130-
const [fullSpec, fullCtx] = feed.lazySplit(/\s*,\s*/, 1);
130+
const [fullSpec, fullCtx = ''] = feed.lazySplit(/\s*,\s*/, 1);
131131
const fullGame = gameFromContext(fullSpec, searchCtx, roomCtx, fullCtx);
132132
if (fullGame) return { game: fullGame, ctx: fullCtx };
133133
const inferredGame = gameFromContext(null, searchCtx, roomCtx, feed);

0 commit comments

Comments
 (0)