Merge pull request #12899 from Snuffleupagus/eslint-env-es2021

Update the ESLint `env` to use "es2021"
This commit is contained in:
Tim van der Meij 2021-01-24 12:23:39 +01:00 committed by GitHub
commit 12e6d9b81e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -18,7 +18,7 @@
"env": {
"browser": true,
"es2020": true,
"es2021": true,
"worker": true,
"amd": true,
},

View File

@ -51,15 +51,12 @@ class App extends PDFObject {
);
this._timeoutIds = new WeakMap();
// eslint-disable-next-line no-undef
if (typeof FinalizationRegistry !== "undefined") {
// About setTimeOut/setInterval return values (specs):
// The return value of this method must be held in a
// JavaScript variable.
// Otherwise, the timeout object is subject to garbage-collection,
// which would cause the clock to stop.
// eslint-disable-next-line no-undef
this._timeoutIdsRegistry = new FinalizationRegistry(
this._cleanTimeout.bind(this)
);