From 97dfc85d5967967da927eba4aae28a9d367886dd Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Fri, 21 Jul 2023 11:06:43 +0200 Subject: [PATCH] BUGFIX: Selecting an assetType can have no effect If there was no constraint on the assetType it was set to undefined --- .../Private/JavaScript/core/src/state/selectedAssetTypeState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Private/JavaScript/core/src/state/selectedAssetTypeState.ts b/Resources/Private/JavaScript/core/src/state/selectedAssetTypeState.ts index 19456eab3..6cfdb866f 100644 --- a/Resources/Private/JavaScript/core/src/state/selectedAssetTypeState.ts +++ b/Resources/Private/JavaScript/core/src/state/selectedAssetTypeState.ts @@ -18,7 +18,7 @@ export const selectedAssetTypeState = selector({ }, set: ({ get, set }, assetType) => { const constraints = get(constraintsState); - if (constraints && constraints.assetType !== assetType) { + if (constraints?.assetType && constraints.assetType !== assetType) { assetType = constraints.assetType; } set(selectedAssetTypeInternalState, assetType);