@dcl/playground-assets 7.1.2-4409365701.commit-a58c7a5 → 7.1.2-4415683908.commit-0a210fd

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.js CHANGED
@@ -15005,18 +15005,25 @@
15005
15005
  if (a !== null && b === null)
15006
15006
  return 1;
15007
15007
  if (a instanceof Uint8Array && b instanceof Uint8Array) {
15008
+ const lengthDifference = a.byteLength - b.byteLength;
15009
+ if (lengthDifference !== 0) {
15010
+ return lengthDifference > 0 ? 1 : -1;
15011
+ }
15008
15012
  let res;
15009
- const n = a.byteLength > b.byteLength ? b.byteLength : a.byteLength;
15010
- for (let i = 0; i < n; i++) {
15013
+ for (let i = 0, n = a.byteLength; i < n; i++) {
15011
15014
  res = a[i] - b[i];
15012
15015
  if (res !== 0) {
15013
15016
  return res > 0 ? 1 : -1;
15014
15017
  }
15015
15018
  }
15016
- res = a.byteLength - b.byteLength;
15017
- return res > 0 ? 1 : res < 0 ? -1 : 0;
15019
+ // the data is exactly the same
15020
+ return 0;
15018
15021
  }
15019
15022
  if (typeof a === 'string') {
15023
+ const lengthDifference = a.length - b.length;
15024
+ if (lengthDifference !== 0) {
15025
+ return lengthDifference > 0 ? 1 : -1;
15026
+ }
15020
15027
  return a.localeCompare(b);
15021
15028
  }
15022
15029
  return a > b ? 1 : -1;