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:
commit
b9efea7620
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user