Fixed: Prevent unexpected data breaking Series Import

(cherry picked from commit b8714d80a1ede761042ab469110edf552a74ac6b)
pull/7840/head
Mark McDowall 2 years ago committed by Qstick
parent dc1b478f2c
commit d699f61f5d

@ -225,13 +225,19 @@ class ImportMovieFooter extends Component {
body={
<ul>
{
importError.responseJSON.map((error, index) => {
return (
<li key={index}>
{error.errorMessage}
</li>
);
})
Array.isArray(importError.responseJSON) ?
importError.responseJSON.map((error, index) => {
return (
<li key={index}>
{error.errorMessage}
</li>
);
}) :
<li>
{
JSON.stringify(importError.responseJSON)
}
</li>
}
</ul>
}

@ -152,13 +152,19 @@ class ImportMovieSelectFolder extends Component {
<ul>
{
saveError.responseJSON.map((e, index) => {
return (
<li key={index}>
{e.errorMessage}
</li>
);
})
Array.isArray(saveError.responseJSON) ?
saveError.responseJSON.map((e, index) => {
return (
<li key={index}>
{e.errorMessage}
</li>
);
}) :
<li>
{
JSON.stringify(saveError.responseJSON)
}
</li>
}
</ul>
</Alert> :

Loading…
Cancel
Save