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

Fixing null reference issue #287

This commit is contained in:
Patrik J. Braun 2022-02-19 00:16:39 +01:00
parent b24d5f4779
commit fbae2e77d2

View File

@ -45,12 +45,12 @@
<app-gallery-directories class="directories"
[directories]="directoryContent.directories || []"></app-gallery-directories>
[directories]="directoryContent?.directories || []"></app-gallery-directories>
<div class="blog-map-row">
<div class="blog-wrapper"
[style.width]="blogOpen ? '100%' : 'calc(100% - 100px)'"
*ngIf="config.Client.MetaFile.markdown && directoryContent.metaFile && (directoryContent.metaFile | mdFiles).length>0">
*ngIf="config.Client.MetaFile.markdown && directoryContent?.metaFile && (directoryContent.metaFile | mdFiles).length>0">
<app-gallery-blog [collapsed]="!blogOpen"
[mdFiles]="directoryContent.metaFile | mdFiles"></app-gallery-blog>
@ -60,10 +60,10 @@
</button>
</div>
<app-gallery-map *ngIf="isPhotoWithLocation && mapEnabled"
[photos]="directoryContent.media | photosOnly"
[gpxFiles]="directoryContent.metaFile | gpxFiles"></app-gallery-map>
[photos]="directoryContent?.media | photosOnly"
[gpxFiles]="directoryContent?.metaFile | gpxFiles"></app-gallery-map>
</div>
<app-gallery-grid [media]="directoryContent.media"
<app-gallery-grid [media]="directoryContent?.media"
[lightbox]="lightbox"></app-gallery-grid>
</ng-container>