When a search returns 0 results, the console traceback shows a javascript error that we haven't handled. For example, when you visit the console.log of this page we see:
Uncaught TypeError: i is undefined
jQuery 13
loadDataTable https://cd.genenetwork.org/static/new/javascript/create_datatable.js:70
create_table https://cd.genenetwork.org/static/new/javascript/create_datatable.js:3
<anonymous> https://cd.genenetwork.org/gsearch?type=gene&terms=symbol:randomfacts:570
jQuery 13
The fix disable the create_table function call when we don't have any results.
Testing
The datatable still works when we have results:
and when no results exists, we don't get the error now:
Description
When a search returns 0 results, the console traceback shows a javascript error that we haven't handled. For example, when you visit the console.log of this page we see:
The fix disable the
create_table
function call when we don't have any results.Testing
The datatable still works when we have results:
and when no results exists, we don't get the error now:
Review Notes
I can also make the change to https://github.com/jnduli/genenetwork2/blob/dd7268bc0c2d841779ba488b13ca0b1f0e9ea6bc/gn2/wqflask/templates/gsearch_pheno.html#L234 but I'm not too sure how to test this