diff --git a/js/main.js b/js/main.js index 77c3193..a70c51c 100644 --- a/js/main.js +++ b/js/main.js @@ -210,6 +210,10 @@ function getTasks() { url: 'ajax/task-list.php', dataType: 'json', success: function(data, stat, jqo) { + if ( data.error ) { + toastr.error(data.message, "Error retrieving task list"); + return; + } $("#form_showall").prop('checked', data.showalltasks); let show = ""; data.tasks.forEach(function(task, index) {