mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3559 from thornbill/remove-equality-funcs
Remove custom equality check functions
This commit is contained in:
commit
054587d9ae
2 changed files with 7 additions and 26 deletions
|
@ -1,6 +1,8 @@
|
|||
import { intervalToDuration } from 'date-fns';
|
||||
import DOMPurify from 'dompurify';
|
||||
import escapeHtml from 'escape-html';
|
||||
import isEqual from 'lodash-es/isEqual';
|
||||
|
||||
import { appHost } from '../../components/apphost';
|
||||
import loading from '../../components/loading/loading';
|
||||
import { appRouter } from '../../components/appRouter';
|
||||
|
@ -1375,10 +1377,9 @@ function renderChildren(page, item) {
|
|||
const childrenItemsContainer = page.querySelector('.childrenItemsContainer');
|
||||
|
||||
if (item.Type == 'MusicAlbum') {
|
||||
const equalSet = (arr1, arr2) => arr1.every(x => arr2.indexOf(x) !== -1) && arr1.length === arr2.length;
|
||||
let showArtist = false;
|
||||
for (const track of result.Items) {
|
||||
if (!equalSet(track.ArtistItems.map(x => x.Id), track.AlbumArtists.map(x => x.Id))) {
|
||||
if (!isEqual(track.ArtistItems.map(x => x.Id).sort(), track.AlbumArtists.map(x => x.Id).sort())) {
|
||||
showArtist = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue