From 4eb4f20fb5371097d39b52b8dff3412cf1fbc8a8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 24 Feb 2022 12:25:14 +0000 Subject: [PATCH] Always update asset type when required, even if no assets of that type exist --- .../app/[application]/design/[assetType]/index.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte index a767b56b4f..444835de22 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte @@ -45,6 +45,14 @@ store.actions.screens.select(id) } } + + // If we didn't find a valid asset, just update the preview type + if (!id) { + store.update(state => { + state.currentFrontEndType = assetType + return state + }) + } }