mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
try to workaround got issue with unhandledRejection (#6230)
This commit is contained in:
parent
b1be810625
commit
dc606ffe0b
3 changed files with 653 additions and 262 deletions
|
|
@ -125,7 +125,8 @@
|
|||
"@graphiql/react": "patches/@graphiql__react.patch",
|
||||
"countup.js": "patches/countup.js.patch",
|
||||
"@oclif/core@4.0.6": "patches/@oclif__core@4.0.6.patch",
|
||||
"@fastify/vite": "patches/@fastify__vite.patch"
|
||||
"@fastify/vite": "patches/@fastify__vite.patch",
|
||||
"p-cancelable@4.0.1": "patches/p-cancelable@4.0.1.patch"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17
patches/p-cancelable@4.0.1.patch
Normal file
17
patches/p-cancelable@4.0.1.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/index.js b/index.js
|
||||
index c48660ea0f74f3d61c2ab8d57f139f7c115e91de..651b5a7d30656c8f41291b3a978b0b5f0a7ad62f 100644
|
||||
--- a/index.js
|
||||
+++ b/index.js
|
||||
@@ -50,7 +50,11 @@ export default class PCancelable {
|
||||
|
||||
const onCancel = handler => {
|
||||
if (this.#state !== promiseState.pending) {
|
||||
- throw new Error(`The \`onCancel\` handler was attached after the promise ${this.#state.description}.`);
|
||||
+ console.error(
|
||||
+ `The \`onCancel\` handler was attached after the promise ${this.#state.description}.`,
|
||||
+ );
|
||||
+
|
||||
+ return;
|
||||
}
|
||||
|
||||
this.#cancelHandlers.push(handler);
|
||||
895
pnpm-lock.yaml
895
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue