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) { for (const layerName of Constants.added_by_default) {
const v = state.sharedLayers.get(layerName) const v = state.sharedLayers.get(layerName)
if (v === undefined) { if (v === undefined) {
context.err( const msg = `Default layer ${layerName} not found. ${state.sharedLayers.size} layers are available`
"Default layer " + if (layerName === "favourite") {
layerName + context.warn(msg)
" not found. " + continue
state.sharedLayers.size + }
" layers are available" context.err(msg)
)
continue continue
} }
if (alreadyLoaded.has(v.id)) { if (alreadyLoaded.has(v.id)) {