Skip to content

Commit 744c5d2

Browse files
authored
[Fix] babel's "loose mode" class transform enbrittles BufferList
```js Object.defineProperty(Object.prototype, util.inspect.custom, { set(v) { throw 'this should not happen inside readable-stream'; } }); ``` With this change, I believe the output will use [[Define]] instead of [[Set]] for https://github.com/nodejs/node/blob/c101251a95cc82142bee4637f8db6cc360a06d82/lib/internal/streams/buffer_list.js#L167, and thus no longer fail when Object.prototype is modified.
1 parent 7783afa commit 744c5d2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

.babelrc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,5 @@
1313
],
1414
"debug": true
1515
}]
16-
],
17-
"plugins": [
18-
// Included in the preset, but we can't specify per-plugin options there
19-
["@babel/plugin-transform-classes", {
20-
"loose": true
21-
}]
2216
]
2317
}

0 commit comments

Comments
 (0)