1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-10-03 22:57:18 +02:00

Fixed: Prevent unexpected data breaking Series Import

(cherry picked from commit b8714d80a1ede761042ab469110edf552a74ac6b)
This commit is contained in:
Mark McDowall 2022-12-17 20:53:57 -08:00 committed by Qstick
parent dc1b478f2c
commit d699f61f5d
2 changed files with 26 additions and 14 deletions

View File

@ -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>
}

View File

@ -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> :