@cocreate/utils 1.14.0 → 1.14.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.14.2](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.14.1...v1.14.2) (2022-12-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * sort type is string and value is undefined replace with empty string ([009cc48](https://github.com/CoCreate-app/CoCreate-utils/commit/009cc48ad7dbfdf1b04dd2e0d8dedbba291e6fb3))
7
+
8
+ ## [1.14.1](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.14.0...v1.14.1) (2022-12-04)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bump dependencies ([047612f](https://github.com/CoCreate-app/CoCreate-utils/commit/047612f5d961df25b08994cd2bd394db5ed552b6))
14
+
1
15
  # [1.14.0](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.13.1...v1.14.0) (2022-12-04)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/utils",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "description": "A simple utils component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "utils",
@@ -61,6 +61,6 @@
61
61
  "webpack-log": "^3.0.1"
62
62
  },
63
63
  "dependencies": {
64
- "@cocreate/docs": "^1.4.11"
64
+ "@cocreate/docs": "^1.4.13"
65
65
  }
66
66
  }
package/src/utils.js CHANGED
@@ -446,6 +446,7 @@
446
446
  if (sort[i].direction == '-1') {
447
447
  switch (typeof b[name]) {
448
448
  case 'string':
449
+ if (!b[name]) b[name] = ""
449
450
  return b[name].localeCompare(a[name])
450
451
  case 'number':
451
452
  return b[name] - a[name]
@@ -456,6 +457,7 @@
456
457
  } else {
457
458
  switch (typeof a[name]) {
458
459
  case 'string':
460
+ if (!a[name]) a[name] = ""
459
461
  return a[name].localeCompare(b[name])
460
462
  case 'number':
461
463
  return a[name] - b[name]