Skip to content

Commit

Permalink
BUGFIX: Prevent rare loading error in inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Aug 4, 2023
1 parent 36c504b commit c9b307c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ const PropertyInspector = () => {
caption !== selectedAsset.caption ||
copyrightNotice !== selectedAsset.copyrightNotice);

const assetSourceForSelectedAsset = assetSources.find(({ id }) => id === selectedAsset.assetSource.id);
const assetSourceForSelectedAsset = selectedAsset
? assetSources.find(({ id }) => id === selectedAsset.assetSource.id)
: null;

const handleDiscard = useCallback(() => {
if (selectedAsset) {
Expand Down

0 comments on commit c9b307c

Please sign in to comment.