@c-rex/components 0.3.0-build.40 → 0.3.0-build.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c-rex/components",
3
- "version": "0.3.0-build.40",
3
+ "version": "0.3.0-build.41",
4
4
  "files": [
5
5
  "src"
6
6
  ],
@@ -264,6 +264,10 @@ const upsertFavorite = (favorites: Favorite[], entry: Favorite): Favorite[] => {
264
264
  }
265
265
 
266
266
  const current = favorites[index];
267
+ if (!current) {
268
+ return [...favorites, entry];
269
+ }
270
+
267
271
  const next = {
268
272
  ...current,
269
273
  label: current.label || entry.label,
@@ -1,4 +1,4 @@
1
- export type RestrictionHierarchyNode = {
1
+ export type RestrictionHierarchyNode = object & {
2
2
  isStructural?: boolean;
3
3
  };
4
4
 
@@ -67,7 +67,7 @@ const InformationUnitSearchResultCard: FC<{
67
67
  fetch(url)
68
68
  .then(r => r.json())
69
69
  .then(vcard => ({ name: vcard.fullName || "", photo: vcard.photos?.[0]?.source || null }))
70
- .catch(() => null)
70
+ .catch((): { name: string; photo: string | null } | null => null)
71
71
  )
72
72
  ).then(results => {
73
73
  setCardData(prev => ({