@nxtedition/lib 19.10.0 → 19.10.1
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/package.json +1 -1
- package/util/compare-rev.js +7 -0
package/package.json
CHANGED
package/util/compare-rev.js
CHANGED
|
@@ -198,6 +198,13 @@ export function compareRevBufferString(a, b) {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
export function compareRevSliceSlice(a, b) {
|
|
201
|
+
// Handle null and undefined
|
|
202
|
+
if (!a || !a.byteLength) {
|
|
203
|
+
return !b || !b.byteLength ? 0 : -1
|
|
204
|
+
} else if (!b || !b.byteLength) {
|
|
205
|
+
return 1
|
|
206
|
+
}
|
|
207
|
+
|
|
201
208
|
if (a === b) {
|
|
202
209
|
return 0
|
|
203
210
|
}
|