forked from MapComplete/MapComplete
UX: studio: fix crash
This commit is contained in:
parent
e547a8ae30
commit
7d20a1924f
1 changed files with 4 additions and 1 deletions
|
@ -387,7 +387,10 @@ class MiscThemeChecks extends DesugaringStep<LayoutConfigJson> {
|
||||||
if (json["clustering"]) {
|
if (json["clustering"]) {
|
||||||
context.warn("Obsolete field `clustering` is still around")
|
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++) {
|
for (let i = 0; i < json.layers.length; i++) {
|
||||||
const l = json.layers[i]
|
const l = json.layers[i]
|
||||||
if (l["override"]?.["source"] === undefined) {
|
if (l["override"]?.["source"] === undefined) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue