Fix: bypass missing favourites in custom theme loader

This commit is contained in:
Pieter Vander Vennet 2023-12-05 01:07:58 +01:00
parent 1cd2d031ba
commit 6f59e46bef

View file

@ -172,13 +172,12 @@ class AddDefaultLayers extends DesugaringStep<LayoutConfigJson> {
for (const layerName of Constants.added_by_default) {
const v = state.sharedLayers.get(layerName)
if (v === undefined) {
context.err(
"Default layer " +
layerName +
" not found. " +
state.sharedLayers.size +
" layers are available"
)
const msg = `Default layer ${layerName} not found. ${state.sharedLayers.size} layers are available`
if (layerName === "favourite") {
context.warn(msg)
continue
}
context.err(msg)
continue
}
if (alreadyLoaded.has(v.id)) {