@icgio/icg-utils 1.7.32 → 1.7.33

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/lib/influxdb.js +4 -3
  2. package/package.json +1 -1
package/lib/influxdb.js CHANGED
@@ -16,14 +16,14 @@ function fields_check(fields) {
16
16
  }
17
17
 
18
18
  function check_points(points) {
19
- return points.filter((point) => {
19
+ points.filter((point) => {
20
20
  if (fields_check(point.fields) && (!point.timestamp || point.timestamp instanceof Date)) {
21
- return true
22
21
  } else {
23
22
  console.error('influx check_points', point)
24
23
  return false
25
24
  }
26
25
  })
26
+ return true
27
27
  }
28
28
 
29
29
  module.exports = class Influx {
@@ -67,7 +67,8 @@ module.exports = class Influx {
67
67
  } else {
68
68
  this.bucket_exist = true
69
69
  }
70
- } else if (check_points(points)) {
70
+ }
71
+ if (check_points(points)) {
71
72
  points = points.map((p) => {
72
73
  let p_temp = new Point(p.measurement)
73
74
  for (let tag in p.tags) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-utils",
3
- "version": "1.7.32",
3
+ "version": "1.7.33",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {