Skip to content

Commit

Permalink
Fixed: Prevent unexpected data breaking Series Import
Browse files Browse the repository at this point in the history
(cherry picked from commit b8714d80a1ede761042ab469110edf552a74ac6b)
  • Loading branch information
markus101 authored and Qstick committed Dec 23, 2022
1 parent dc1b478 commit d699f61
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
20 changes: 13 additions & 7 deletions frontend/src/AddMovie/ImportMovie/Import/ImportMovieFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> :
Expand Down

0 comments on commit d699f61

Please sign in to comment.