Compare commits

...

2 Commits

Author SHA1 Message Date
Jonathan Gramain bcabdeeadb Merge branch 'bf/S3C-1040-locations-max-issue' into fwd/bf/S3C-1040-locations-max-issue-master 2017-11-02 18:32:23 -07:00
Jonathan Gramain e166d1a894 bf: convert contentLength to number
Make sure contentLength is converted to a number because it might
be a string.
2017-11-02 18:31:02 -07:00
1 changed files with 2 additions and 1 deletions

View File

@ -310,7 +310,8 @@ function _contentLengthMatchesLocations(contentLength, dataLocations) {
(sum, location) => (sum !== undefined && location.size ? (sum, location) => (sum !== undefined && location.size ?
sum + Number.parseInt(location.size, 10) : sum + Number.parseInt(location.size, 10) :
undefined), 0); undefined), 0);
return sumSizes === undefined || sumSizes === contentLength; return sumSizes === undefined ||
sumSizes === Number.parseInt(contentLength, 10);
} }
const routesUtils = { const routesUtils = {