mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Replace the isInt
helper function with the native Number.isInteger
function
*Follow-up to PR 8643.*
This commit is contained in:
parent
066fea9c8b
commit
11408da340
12 changed files with 65 additions and 72 deletions
|
@ -16,7 +16,6 @@
|
|||
import {
|
||||
PRIVATE_USE_OFFSET_END, PRIVATE_USE_OFFSET_START, ProblematicCharRanges
|
||||
} from '../../src/core/fonts';
|
||||
import { isInt } from '../../src/shared/util';
|
||||
|
||||
/**
|
||||
* Used to validate the entries in `ProblematicCharRanges`, and to ensure that
|
||||
|
@ -41,7 +40,7 @@ var checkProblematicCharRanges = function checkProblematicCharRanges() {
|
|||
lower: ProblematicCharRanges[i],
|
||||
upper: ProblematicCharRanges[i + 1],
|
||||
};
|
||||
if (!isInt(limits.lower) || !isInt(limits.upper)) {
|
||||
if (!Number.isInteger(limits.lower) || !Number.isInteger(limits.upper)) {
|
||||
throw new Error('Range endpoints must be integers: ' +
|
||||
printRange(limits));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue