Skip to content

Commit 27297bc

Browse files
committed
chore: cast game code to expected enum type
1 parent 961cdce commit 27297bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

electron/main/ipc/handlers/play-character.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { GameCode } from '../../../common/game/types.js';
12
import type { AccountService } from '../../account/types.js';
23
import { Game } from '../../game/game.instance.js';
34
import { SGEServiceImpl } from '../../sge/sge.service.js';
@@ -43,7 +44,7 @@ export const playCharacterHandler = (options: {
4344
dispatch('game:connect', {
4445
accountName,
4546
characterName,
46-
gameCode,
47+
gameCode: gameCode as GameCode,
4748
});
4849

4950
logger.debug('subscribing to game service stream');
@@ -61,7 +62,7 @@ export const playCharacterHandler = (options: {
6162
dispatch('game:disconnect', {
6263
accountName,
6364
characterName,
64-
gameCode,
65+
gameCode: gameCode as GameCode,
6566
});
6667
},
6768
});

0 commit comments

Comments
 (0)