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(""); setParsingError("");
try { try {
const startingFen = startingPositionInput.startsWith("[") const input = startingPositionInput.trim();
? getGameFromPgn(startingPositionInput).fen() const startingFen = input.startsWith("[")
: startingPositionInput || undefined; ? getGameFromPgn(input).fen()
: input || undefined;
resetGame({ resetGame({
white: { white: {