addigy 2.5.0 → 2.6.0

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.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -932,6 +932,7 @@ class Addigy {
932
932
  return JSON.parse(res.body);
933
933
  }
934
934
  async getCustomFacts(authObject) {
935
+ var _a;
935
936
  const res = await this._addigyRequest('https://app-prod.addigy.com/api/services/facts/custom', {
936
937
  headers: {
937
938
  Cookie: `auth_token=${authObject.authToken};`,
@@ -939,7 +940,8 @@ class Addigy {
939
940
  },
940
941
  method: 'GET',
941
942
  });
942
- return JSON.parse(res.body);
943
+ const results = JSON.parse(res.body);
944
+ return (_a = results.custom_facts) !== null && _a !== void 0 ? _a : [];
943
945
  }
944
946
  async getCustomFactByName(authObject, name) {
945
947
  const facts = await this.getCustomFacts(authObject);
package/package.json CHANGED
@@ -59,7 +59,7 @@
59
59
  "tsc": "tsc -p tsconfig.build.json"
60
60
  },
61
61
  "types": "index.d.ts",
62
- "version": "2.5.0",
62
+ "version": "2.6.0",
63
63
  "volta": {
64
64
  "node": "14.17.1",
65
65
  "yarn": "1.22.10"