Skip to content

Commit fb878fe

Browse files
committed
Add check for commas in start/stop
1 parent 7b689ea commit fb878fe

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

jbrowse/resources/views/genotypeTable.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
var start = LABKEY.ActionURL.getParameter("start");
66
var stop = LABKEY.ActionURL.getParameter("stop");
77

8+
if (!start || !stop) {
9+
alert('Must provide a start and stop!')
10+
return
11+
}
12+
13+
if (isNaN(start)) {
14+
start = String(start).replaceAll(',', '')
15+
}
16+
17+
if (isNaN(stop)) {
18+
stop = String(stop).replaceAll(',', '')
19+
}
20+
21+
if (isNaN(start) || isNaN(stop)) {
22+
alert('Start and stop must be integers!')
23+
return
24+
}
25+
826
LABKEY.Ajax.request({
927
url: LABKEY.ActionURL.buildURL('jbrowse', 'getGenotypes', null),
1028
method: 'POST',

0 commit comments

Comments
 (0)