We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4013c4b commit 586ab5eCopy full SHA for 586ab5e
lib/compat/dispatcher-weakref.js
@@ -31,6 +31,14 @@ class CompatFinalizer {
31
}
32
33
module.exports = function () {
34
+ // FIXME: remove workaround when the Node bug is fixed
35
+ // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308
36
+ if (process.env.NODE_V8_COVERAGE) {
37
+ return {
38
+ WeakRef: CompatWeakRef,
39
+ FinalizationRegistry: CompatFinalizer
40
+ }
41
42
return {
43
WeakRef: global.WeakRef || CompatWeakRef,
44
FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer
0 commit comments