Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Remove unnecessary checks for undefined before ToPositiveI…
…nteger `ToPositiveInteger(undefined)` calls `ToIntegerThrowOnInfinity(undefined)`, which in turn calls `ToIntegerOrInfinity(undefined)`, which in turn calls `ToNumber(undefined)`. `ToNumber` returns `NaN`, `ToIntegerOrInfinity` then returns `0`, `ToIntegerThrowOnInfinity` returns `0` unchanged, and finally `ToPositiveInteger` will throw a RangeError for `0`. That means it's not necessary to handle `undefined` before calling `ToPositiveInteger`.
- Loading branch information