Attempt to fix social image previews

This commit is contained in:
Pieter Vander Vennet 2022-01-18 20:18:12 +01:00
parent 25f956c808
commit 5c71bfa294
18 changed files with 147 additions and 83 deletions

View file

@ -102,6 +102,11 @@ export default class LayoutConfig {
this.descriptionTail = json.descriptionTail === undefined ? undefined : new Translation(json.descriptionTail, context + ".descriptionTail");
this.icon = json.icon;
this.socialImage = json.socialImage;
if(this.socialImage === null || this.socialImage === "" || this.socialImage === undefined){
if(official){
throw "Theme "+json.id+" has no social image defined"
}
}
this.startZoom = json.startZoom;
this.startLat = json.startLat;
this.startLon = json.startLon;