mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
process: make Symbol.toStringTag writable
The ecosystem broke by making it non-writable, so this is a good intermediate fix. PR-URL: https://github.com/nodejs/node/pull/26488 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
e1a55e76b4
commit
275a8f9316
|
|
@ -350,7 +350,7 @@ function setupProcessObject() {
|
|||
EventEmitter.call(process);
|
||||
Object.defineProperty(process, Symbol.toStringTag, {
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
writable: true,
|
||||
configurable: false,
|
||||
value: 'process'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,3 +4,4 @@ import assert from 'assert';
|
|||
import process from 'process';
|
||||
|
||||
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
|
||||
assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user