X-Git-Url: https://git.auder.net/js/css/rpsls.css?a=blobdiff_plain;f=client%2Fsrc%2Fdata%2FproblemCheck.js;h=d0978cbcc1dc97e9b32702a438e8a6c0c241f2a9;hb=866842c3c310524c034922870234120ed2a16cbf;hp=3b9ccb4677acbb53dbfb8ad094666f68c45457e9;hpb=89021f181ac0689bbc785ce0ebd9a910e66352b0;p=vchess.git diff --git a/client/src/data/problemCheck.js b/client/src/data/problemCheck.js index 3b9ccb46..d0978cbc 100644 --- a/client/src/data/problemCheck.js +++ b/client/src/data/problemCheck.js @@ -1,9 +1,8 @@ -export function checkProblem(p) -{ +export function checkProblem(p) { const vid = parseInt(p.vid); - if (isNaN(vid) || vid <= 0) - return "Please select a variant"; + if (isNaN(vid) || vid <= 0) return "Please select a variant"; - if (!V.IsGoodFen(p.fen)) - return "Bad FEN string"; + if (!V.IsGoodFen(p.fen)) return "Errors in FEN"; + + return ""; }