mirror of https://github.com/nodejs/node.git
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>pull/26617/head
parent
f77555f792
commit
2a7da11ed8
|
@ -283,7 +283,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