@cocreate/utils 1.14.1 → 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 +7 -0
- package/package.json +1 -1
- package/src/utils.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
## [1.14.1](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.14.0...v1.14.1) (2022-12-04)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
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]
|