- fixed bug in evaluation page - related to null in fieldValue that was not accounted for;
This commit is contained in:
@@ -266,9 +266,11 @@ const DomandaEditPreInstructor = () => {
|
|||||||
switch (item.fieldName) {
|
switch (item.fieldName) {
|
||||||
case 'fileupload' :
|
case 'fileupload' :
|
||||||
content = <ul>
|
content = <ul>
|
||||||
{item.fieldValue.map(o => <li key={o.id}>
|
{item.fieldValue
|
||||||
|
? item.fieldValue.map(o => <li key={o.id}>
|
||||||
{o.filePath ? <a href={o.filePath}>{o.name}</a> : null}
|
{o.filePath ? <a href={o.filePath}>{o.name}</a> : null}
|
||||||
</li>)}
|
</li>)
|
||||||
|
: null}
|
||||||
</ul>;
|
</ul>;
|
||||||
break;
|
break;
|
||||||
case 'table' :
|
case 'table' :
|
||||||
@@ -280,9 +282,11 @@ const DomandaEditPreInstructor = () => {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{item.fieldValue.map((o, i) => <tr key={i}>
|
{item.fieldValue
|
||||||
|
? item.fieldValue.map((o, i) => <tr key={i}>
|
||||||
{Object.values(o).map(v => <td key={v}>{v}</td>)}
|
{Object.values(o).map(v => <td key={v}>{v}</td>)}
|
||||||
</tr>)}
|
</tr>)
|
||||||
|
: null}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>;
|
</table>;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user