@things-factory/contact 7.0.49 → 7.0.52

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": "@things-factory/contact",
3
- "version": "7.0.49",
3
+ "version": "7.0.52",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -36,5 +36,5 @@
36
36
  "@things-factory/auth-base": "^7.0.49",
37
37
  "@things-factory/shell": "^7.0.49"
38
38
  },
39
- "gitHead": "3fdc2d9c86f8ebf1470fa5d2155b7b3019df6c0d"
39
+ "gitHead": "ff6154d83646d8bd49030984a8122d3d5896d646"
40
40
  }
@@ -11,7 +11,7 @@ function getContactItems(contact: Contact) {
11
11
  const { items } = contact
12
12
 
13
13
  if (!items || !(items instanceof Array)) {
14
- return null
14
+ return []
15
15
  }
16
16
 
17
17
  return items
@@ -20,7 +20,7 @@ function getContactItems(contact: Contact) {
20
20
  function getContactItem(contact: Contact, type: String, label: String) {
21
21
  const { items } = contact
22
22
 
23
- return items?.find(item => item.type === type && item.label === label)?.value || ''
23
+ return items?.find(item => item.type === type && item.label === label)?.value || null
24
24
  }
25
25
 
26
26
  @Resolver(Contact)