@veritree/services 1.0.0-0 → 1.0.0-1

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": "@veritree/services",
3
- "version": "1.0.0-0",
3
+ "version": "1.0.0-1",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -4,7 +4,10 @@ import { createParamsStringFromArgs } from "../utils/args";
4
4
 
5
5
  export default function Api(resource) {
6
6
  const baseUrl = `${process.env.API_VERITREE_URL}/api`;
7
- const { orgId, orgType } = getSession();
7
+ const session = getSession();
8
+ if(!session) return;
9
+ const { orgId, orgType } = session;
10
+
8
11
 
9
12
  if (!orgId && !orgType) {
10
13
  throw new Error("Organization id and type are required");