pdfjs: Make eslint happy about polyfills

This commit is contained in:
Florian Bruhin 2024-12-10 17:45:13 +01:00
parent 9d1ca7cbf5
commit 666b7d4df0
2 changed files with 6 additions and 2 deletions

View File

@ -62,3 +62,4 @@ rules:
function-call-argument-newline: "off"
no-negated-condition: "off"
no-console: "off"
sort-vars: "off"

View File

@ -1,6 +1,9 @@
/* eslint-disable strict */
/* (this file gets used as a snippet) */
(function() {
if (typeof Promise.withResolvers === 'undefined') {
Promise.withResolvers = function () {
if (typeof Promise.withResolvers === "undefined") {
Promise.withResolvers = function() {
let resolve, reject
const promise = new Promise((res, rej) => {
resolve = res