Skip to content

Commit 6e76153

Browse files
authored
Merge pull request #1835 from Caltech-IPAC/IRSA-7239-target
IRSA-7239: target entry bug
2 parents 41b2c7e + 9284655 commit 6e76153

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/firefly/js/ui/PositionFieldDef.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,18 @@ function positionValidateInternal(s, hard, nullAllowed= true) {
3636
// validate RA
3737
if (isNaN(ra)) {
3838
const errRA = raParseErr || 'Unable to parse RA';
39-
if (errRA) throw `${errMsgRoot}${errRA}`;
39+
if (errRA) {
40+
if (hard) throw `${errMsgRoot}${errRA}`;
41+
return {valid:false,inputType};
42+
}
4043
}
4144
// validate DEC
4245
if (isNaN(dec)) {
4346
const errDec = decParseErr || 'Unable to parse DEC';
44-
if (errDec) throw `${errMsgRoot}${errDec}`;
47+
if (errDec) {
48+
if (hard) throw `${errMsgRoot}${errDec}`;
49+
return {valid:false,inputType};
50+
}
4551
}
4652
}
4753
return {valid:true};

0 commit comments

Comments
 (0)