Skip to content

Commit

Permalink
BUGFIX: Selecting an assetType can have no effect
Browse files Browse the repository at this point in the history
If there was no constraint on the assetType it was set to undefined
  • Loading branch information
Sebobo committed Jul 21, 2023
1 parent 07766ab commit 97dfc85
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const selectedAssetTypeState = selector<AssetType | ''>({
},
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);
Expand Down

0 comments on commit 97dfc85

Please sign in to comment.