@slavmak2486/bx24ts 1.1.1 → 1.1.3

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/base/BX24.ts CHANGED
@@ -299,14 +299,9 @@ export abstract class baseBX24{
299
299
  let cnt=0;
300
300
 
301
301
  for(const idx in cmd){
302
- let method = "", params = null;
303
- if(Array.isArray(cmd[idx])){
304
- method = __get(cmd[idx], 0, undefined); params = __get(cmd[idx], 1, {});
305
- }
306
- else if (__get(cmd[idx], 'method', undefined)!=undefined)
307
- {
308
- method = __get(cmd[idx], 'method', undefined); params = __get(cmd[idx], 'params', {});
309
- }
302
+ const row=cmd[idx];
303
+ const method=Array.isArray(row)?row[0]:row.method;
304
+ const params=Array.isArray(row)?row[1]:row.params;
310
305
 
311
306
  if(method)
312
307
  {
package/dist/base/BX24.js CHANGED
@@ -247,15 +247,9 @@ class baseBX24 {
247
247
  const comands = {};
248
248
  let cnt = 0;
249
249
  for (const idx in cmd) {
250
- let method = "", params = null;
251
- if (Array.isArray(cmd[idx])) {
252
- method = (0, lodash_1.get)(cmd[idx], 0, undefined);
253
- params = (0, lodash_1.get)(cmd[idx], 1, {});
254
- }
255
- else if ((0, lodash_1.get)(cmd[idx], 'method', undefined) != undefined) {
256
- method = (0, lodash_1.get)(cmd[idx], 'method', undefined);
257
- params = (0, lodash_1.get)(cmd[idx], 'params', {});
258
- }
250
+ const row = cmd[idx];
251
+ const method = Array.isArray(row) ? row[0] : row.method;
252
+ const params = Array.isArray(row) ? row[1] : row.params;
259
253
  if (method) {
260
254
  cnt++;
261
255
  comands[idx] = `${method}?${encodeURIComponent(this.getHttpString(params))}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slavmak2486/bx24ts",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Library for bitrix24",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",