UX: studio: fix crash

This commit is contained in:
Pieter Vander Vennet 2024-08-10 15:36:47 +02:00
parent e547a8ae30
commit 7d20a1924f

View file

@ -387,7 +387,10 @@ class MiscThemeChecks extends DesugaringStep<LayoutConfigJson> {
if (json["clustering"]) {
context.warn("Obsolete field `clustering` is still around")
}
{
if(json.layers === undefined){
context.err("This theme has no layers defined")
}else{
for (let i = 0; i < json.layers.length; i++) {
const l = json.layers[i]
if (l["override"]?.["source"] === undefined) {