fix : issue#58 startingPositionInput trim
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user