porffor 0.18.8 → 0.18.9
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/compiler/builtins/array.ts +3 -0
- package/package.json +1 -1
- package/runner/index.js +1 -1
@@ -388,9 +388,12 @@ export const __Array_prototype_sort = (_this: any[], callbackFn: any) => {
|
|
388
388
|
else {
|
389
389
|
// 4. If comparefn is not undefined, then
|
390
390
|
// a. Let v be ? ToNumber(? Call(comparefn, undefined, « x, y »)).
|
391
|
+
// perf: unneeded as we just check >= 0
|
392
|
+
// v = Number(callbackFn(x, y));
|
391
393
|
v = callbackFn(x, y);
|
392
394
|
|
393
395
|
// b. If v is NaN, return +0𝔽.
|
396
|
+
// perf: unneeded as we just check >= 0
|
394
397
|
// if (Number.isNaN(v)) v = 0;
|
395
398
|
|
396
399
|
// c. Return v.
|
package/package.json
CHANGED