mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-23 14:07:20 -04:00
Fixed destructuring null statistics for bulk delete movies modal
This commit is contained in:
parent
10bb270da8
commit
4cec41324b
1 changed files with 6 additions and 7 deletions
|
@ -88,8 +88,7 @@ function DeleteMovieModalContent(props: DeleteMovieModalContentProps) {
|
|||
|
||||
const { totalMovieFileCount, totalSizeOnDisk } = useMemo(() => {
|
||||
return movies.reduce(
|
||||
(acc, m) => {
|
||||
const { statistics = { movieFileCount: 0, sizeOnDisk: 0 } } = m;
|
||||
(acc, { statistics = {} }) => {
|
||||
const { movieFileCount = 0, sizeOnDisk = 0 } = statistics;
|
||||
|
||||
acc.totalMovieFileCount += movieFileCount;
|
||||
|
@ -159,17 +158,17 @@ function DeleteMovieModalContent(props: DeleteMovieModalContentProps) {
|
|||
</div>
|
||||
|
||||
<ul>
|
||||
{movies.map((m) => {
|
||||
const { movieFileCount = 0, sizeOnDisk = 0 } = m.statistics;
|
||||
{movies.map(({ title, path, statistics = {} }) => {
|
||||
const { movieFileCount = 0, sizeOnDisk = 0 } = statistics;
|
||||
|
||||
return (
|
||||
<li key={m.title}>
|
||||
<span>{m.title}</span>
|
||||
<li key={title}>
|
||||
<span>{title}</span>
|
||||
|
||||
{deleteFiles && (
|
||||
<span>
|
||||
<span className={styles.pathContainer}>
|
||||
-<span className={styles.path}>{m.path}</span>
|
||||
-<span className={styles.path}>{path}</span>
|
||||
</span>
|
||||
|
||||
{!!movieFileCount && (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue