@ztimson/utils 0.28.2 → 0.28.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/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -428,6 +428,8 @@ ${opts.message || this.desc}`;
|
|
|
428
428
|
return function(a, b) {
|
|
429
429
|
const aVal = dotNotation(a, prop);
|
|
430
430
|
const bVal = dotNotation(b, prop);
|
|
431
|
+
if (aVal === void 0) return 1;
|
|
432
|
+
if (bVal === void 0) return -1;
|
|
431
433
|
if (typeof aVal == "number" && typeof bVal == "number")
|
|
432
434
|
return (reverse ? -1 : 1) * (aVal - bVal);
|
|
433
435
|
if (aVal > bVal) return reverse ? -1 : 1;
|