Merge pull request #5980 from ksritharan/master

Fix to SafeRange to allow more valid ranges
This commit is contained in:
Richard Davey 2022-02-03 15:38:38 +00:00 committed by GitHub
commit eee004485f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,8 +24,7 @@ var SafeRange = function (array, startIndex, endIndex, throwError)
if (startIndex < 0 ||
startIndex > len ||
startIndex >= endIndex ||
endIndex > len ||
startIndex + endIndex > len)
endIndex > len)
{
if (throwError)
{