fix : issue#58 startingPositionInput trim

This commit is contained in:
GuillaumeSD
2025-07-04 17:31:37 +02:00
parent aece5db7ce
commit 2674243b0c

View File

@@ -59,9 +59,10 @@ export default function GameSettingsDialog({ open, onClose }: Props) {
setParsingError("");
try {
const startingFen = startingPositionInput.startsWith("[")
? getGameFromPgn(startingPositionInput).fen()
: startingPositionInput || undefined;
const input = startingPositionInput.trim();
const startingFen = input.startsWith("[")
? getGameFromPgn(input).fen()
: input || undefined;
resetGame({
white: {