1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Fix error on mobile when viewing pigallery2 with videos disabled

This commit is contained in:
anthonyliao 2019-02-10 11:18:54 -05:00
parent 5263c77b40
commit 4a6f168730

View File

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