feat: upgrade libraries for dependabot alerts (#3300)

* feat: upgrade libraries and code cleanup
This commit is contained in:
lohit
2024-10-17 11:04:47 +05:30
committed by GitHub
parent bb14ec22f7
commit cc8f3de8be
29 changed files with 7436 additions and 6386 deletions

View File

@@ -0,0 +1,24 @@
export const setupPolyfills = () => {
// polyfill required to make react-pdf
if (typeof Promise.withResolvers === "undefined") {
if (typeof window !== 'undefined') {
window.Promise.withResolvers = function () {
let resolve, reject
const promise = new Promise((res, rej) => {
resolve = res
reject = rej
})
return { promise, resolve, reject }
}
} else {
global.Promise.withResolvers = function () {
let resolve, reject
const promise = new Promise((res, rej) => {
resolve = res
reject = rej
})
return { promise, resolve, reject }
}
}
}
}