1
0
Fork 0
mirror of https://github.com/qurator-spk/neat.git synced 2025-06-11 20:59:54 +02:00

handle empty files more gracefully.

This commit is contained in:
Kai 2021-03-10 16:43:19 +01:00
parent 98c564ca57
commit b1181f0baf

10
neat.js
View file

@ -48,7 +48,15 @@ function loadFile(evt, onComplete) {
function setupInterface(data, file, urls) {
if (data.data.length <= 0) return null;
if (data.data.length <= 0) {
let empty_html = `
File is empty.
<a href="neat.html"> Load another one.</a>
`;
$('#tableregion').html(empty_html);
return null;
}
// private variables of app