fix : empty starting position in /play
This commit is contained in:
@@ -62,7 +62,7 @@ export default function GameSettingsDialog({ open, onClose }: Props) {
|
|||||||
try {
|
try {
|
||||||
const startingFen = startingPositionInput.startsWith("[")
|
const startingFen = startingPositionInput.startsWith("[")
|
||||||
? getGameFromPgn(startingPositionInput).fen()
|
? getGameFromPgn(startingPositionInput).fen()
|
||||||
: startingPositionInput;
|
: startingPositionInput || undefined;
|
||||||
|
|
||||||
resetGame({
|
resetGame({
|
||||||
white: {
|
white: {
|
||||||
@@ -197,7 +197,7 @@ export default function GameSettingsDialog({ open, onClose }: Props) {
|
|||||||
|
|
||||||
<FormControl fullWidth>
|
<FormControl fullWidth>
|
||||||
<TextField
|
<TextField
|
||||||
label="Enter starting position here (FEN or PGN)"
|
label="Optional starting position (FEN or PGN)"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
multiline
|
multiline
|
||||||
value={startingPositionInput}
|
value={startingPositionInput}
|
||||||
|
|||||||
Reference in New Issue
Block a user