Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix casting negative number to usize in
Array.splice
(#2030)
This Pull Request fixes a faulty cast for `Array.splice`. Negative values for delete_count were being directly casted to usize, which was not the intended behavior. This pull request fixes the issue by using a fallible conversion, defaulting to 0 if the conversion fails. It changes the following: - Replace cast in `Array.splice` prototype method with fallible conversion.
- Loading branch information