Fix bug in eval node

This commit is contained in:
Ian Arawjo 2023-05-03 20:27:09 -04:00
parent 843234de44
commit d3f58722ce

View File

@ -89,12 +89,10 @@ const EvaluatorNode = ({ data, id }) => {
}, rejected).then(function(response) {
return response.json();
}, rejected).then(function(json) {
console.log(json);
// Check if there's an error; if so, bubble it up to user and exit:
if (json.error) {
if (!json || json.error) {
setStatus('error');
alertModal.current.trigger(json.error);
alertModal.current.trigger(json ? json.error : 'Unknown error encountered when requesting evaluations: empty response returned.');
return;
}