fix MyEntries when metric tests is none
This commit is contained in:
parent
b8d1434040
commit
c5d45ac7c4
@ -23,14 +23,16 @@ const getMyEntries = (challengeName, setDataOriginalState, setDataStateForSearch
|
||||
};
|
||||
}
|
||||
for (let test of tests) {
|
||||
if (!Object.hasOwn(item.evaluations, `${test.metric}.${test.name}`)) {
|
||||
item = {
|
||||
...item,
|
||||
evaluations: {
|
||||
...item.evaluations,
|
||||
[`${test.metric}.${test.name}`]: '-1'
|
||||
}
|
||||
};
|
||||
if (item.evaluations) {
|
||||
if (!Object.hasOwn(item.evaluations, `${test.metric}.${test.name}`)) {
|
||||
item = {
|
||||
...item,
|
||||
evaluations: {
|
||||
...item.evaluations,
|
||||
[`${test.metric}.${test.name}`]: '-1'
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
item = {
|
||||
|
@ -121,10 +121,14 @@ const Table = (props) => {
|
||||
else {
|
||||
let newElem = [];
|
||||
for (let metric of props.possibleMetrics) {
|
||||
if (elem[props.iterableColumnElement.name][metric] === '-1')
|
||||
if (Object.hasOwn(elem, props.iterableColumnElement.name)) {
|
||||
if (elem[props.iterableColumnElement.name][metric] === '-1')
|
||||
newElem.push('N/A');
|
||||
else
|
||||
newElem.push(elem[props.iterableColumnElement.name][metric]);
|
||||
} else {
|
||||
newElem.push('N/A');
|
||||
else
|
||||
newElem.push(elem[props.iterableColumnElement.name][metric]);
|
||||
}
|
||||
}
|
||||
elem = newElem;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user