Merge master

This commit is contained in:
Pieter Vander Vennet 2022-01-08 13:04:59 +01:00
commit e8d1d5422e
2 changed files with 8 additions and 6 deletions

View file

@ -54,11 +54,13 @@ export default class LayoutConfig {
constructor(json: LayoutConfigJson, official = true, context?: string) {
this.official = official;
this.id = json.id;
if(json.id.toLowerCase() !== json.id){
throw "The id of a theme should be lowercase: "+json.id
}
if(json.id.match(/[a-z0-9-_]/) == null){
throw "The id of a theme should match [a-z0-9-_]*: "+json.id
if(official){
if(json.id.toLowerCase() !== json.id){
throw "The id of a theme should be lowercase: "+json.id
}
if(json.id.match(/[a-z0-9-_]/) == null){
throw "The id of a theme should match [a-z0-9-_]*: "+json.id
}
}
context = (context ?? "") + "." + this.id;
this.maintainer = json.maintainer;