@qrvey/utils 1.4.3 → 1.4.4

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.4.3*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.4.4*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -9,7 +9,7 @@ const isEmpty_1 = require("../../../general/mix/isEmpty");
9
9
  */
10
10
  function getQrveyIdsByUIFilters(uiFilter) {
11
11
  const qrveyids = [];
12
- if ((0, isEmpty_1.isEmpty)(uiFilter))
12
+ if ((0, isEmpty_1.isEmpty)(uiFilter) || (0, isEmpty_1.isEmpty)(uiFilter.scopes))
13
13
  return qrveyids;
14
14
  uiFilter.scopes.forEach((scope) => {
15
15
  if (!(0, isEmpty_1.isEmpty)(scope.datasets)) {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeUndefinedDeep = void 0;
4
- const isEmpty_1 = require("../mix/isEmpty");
5
4
  const cloneDeep_1 = require("./cloneDeep");
6
5
  const isObject_1 = require("./isObject");
7
6
  /**
@@ -15,7 +14,7 @@ function removeUndefinedDeep(obj) {
15
14
  if ((0, isObject_1.isObject)(_obj[key]) || Array.isArray(_obj[key])) {
16
15
  _obj[key] = removeUndefinedDeep(_obj[key]);
17
16
  }
18
- else if ((0, isEmpty_1.isEmpty)(obj[key])) {
17
+ else if (obj[key] == null) {
19
18
  delete _obj[key];
20
19
  }
21
20
  });
@@ -6,7 +6,7 @@ import { isEmpty } from "../../../general/mix/isEmpty";
6
6
  */
7
7
  export function getQrveyIdsByUIFilters(uiFilter) {
8
8
  const qrveyids = [];
9
- if (isEmpty(uiFilter))
9
+ if (isEmpty(uiFilter) || isEmpty(uiFilter.scopes))
10
10
  return qrveyids;
11
11
  uiFilter.scopes.forEach((scope) => {
12
12
  if (!isEmpty(scope.datasets)) {
@@ -1,4 +1,3 @@
1
- import { isEmpty } from "../mix/isEmpty";
2
1
  import { cloneDeep } from "./cloneDeep";
3
2
  import { isObject } from "./isObject";
4
3
  /**
@@ -12,7 +11,7 @@ export function removeUndefinedDeep(obj) {
12
11
  if (isObject(_obj[key]) || Array.isArray(_obj[key])) {
13
12
  _obj[key] = removeUndefinedDeep(_obj[key]);
14
13
  }
15
- else if (isEmpty(obj[key])) {
14
+ else if (obj[key] == null) {
16
15
  delete _obj[key];
17
16
  }
18
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Helper, Utils for all Qrvey Projects",
5
5
  "homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
6
6
  "main": "dist/index.js",