mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
[test] Fix Error Proxy stack assignment in Node.js 21+ (#36967)
Same as #35227, but for `set`. V8's `stack` setter silently noops when `this` is a Proxy (nodejs/node#60862), so prodstack-stripping assignments like `error.stack = 'Error: ' + message` in `resolveErrorProd` were dropped and reads returned the real stack. This caused `yarn test --prod` failures on Node 21+. ## Test Plan `yarn test --prod` passes on both old and new Nodes. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Hanzo Dev
parent
2a784bedd2
commit
ff48978c00
@@ -140,6 +140,10 @@ if (process.env.REACT_CLASS_EQUIVALENCE_TEST) {
|
||||
if (key === 'message') {
|
||||
return ReflectSet(target, key, decodeErrorMessage(value), receiver);
|
||||
}
|
||||
if (key === 'stack') {
|
||||
// https://github.com/nodejs/node/issues/60862
|
||||
return ReflectSet(target, key, value);
|
||||
}
|
||||
return ReflectSet(target, key, value, receiver);
|
||||
},
|
||||
get(target, key, receiver) {
|
||||
|
||||
Reference in New Issue
Block a user