@sanity/mutator 4.14.3-next.7 → 4.15.0-next.10

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/lib/index.mjs CHANGED
@@ -258,7 +258,7 @@ class Tokenizer {
258
258
  const number = this.takeWhile((char) => char === "." && !dotSeen && digitSeen ? (dotSeen = !0, char) : (digitSeen = !0, char.match(digitChar) ? char : null));
259
259
  return number !== null ? {
260
260
  type: "number",
261
- value: negative ? -number : +number,
261
+ value: negative ? -Number(number) : +number,
262
262
  raw: negative ? `-${number}` : number
263
263
  } : (this.i = start, null);
264
264
  }
@@ -978,7 +978,7 @@ function targetsToIndicies(targets, accessor) {
978
978
  const result = [];
979
979
  return targets.forEach((target) => {
980
980
  target.isIndexReference() && result.push(...target.toIndicies(accessor));
981
- }), result.sort();
981
+ }), result.sort((a, b) => a - b);
982
982
  }
983
983
  class InsertPatch {
984
984
  location;