@veritree/services 1.0.0-7 → 1.0.0-8

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-7",
3
+ "version": "1.0.0-8",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -153,11 +153,11 @@ export default class Api {
153
153
  }
154
154
 
155
155
  if (!isOrgLess) {
156
- if (this.orgId) orgIdParam = `&org_id=${this.orgId}`;
156
+ if (this.orgId) orgIdParam = `org_id=${this.orgId}`;
157
157
  if (this.orgType) orgTypeParam = `&org_type=${this.orgType}`;
158
158
  }
159
159
 
160
- return `?${orgIdParam}&${orgTypeParam}${createParamsStringFromArgs(args)}`;
160
+ return `?${orgIdParam}${orgTypeParam}${createParamsStringFromArgs(args)}`;
161
161
  }
162
162
 
163
163
  /**
package/src/utils/args.js CHANGED
@@ -23,6 +23,5 @@ export const createParamsStringFromArgs = (args) => {
23
23
  }
24
24
  });
25
25
 
26
- if (!paramsString.length) return "";
27
- return `&${paramsString.join("&")}`;
26
+ return paramsString.length ? `&${paramsString.join("&")}` : "";
28
27
  };