1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Merge pull request #51 from anthonyliao/master

Fix error on mobile when viewing pigallery2 with videos disabled
This commit is contained in:
Patrik J. Braun 2019-02-10 19:23:13 -05:00 committed by GitHub
commit b9efea7620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,9 @@ export class GalleryMWs {
if (cw.directory) { if (cw.directory) {
const removeVideos = (dir: DirectoryDTO) => { const removeVideos = (dir: DirectoryDTO) => {
dir.media = dir.media.filter(m => !MediaDTO.isVideo(m)); dir.media = dir.media.filter(m => !MediaDTO.isVideo(m));
if (dir.directories) {
dir.directories.forEach(d => removeVideos(d)); dir.directories.forEach(d => removeVideos(d));
}
}; };
removeVideos(cw.directory); removeVideos(cw.directory);
} }