test: fix warnings when StrictDict values are checked with propTypes (#2565)

This commit is contained in:
Braden MacDonald
2025-10-24 14:16:07 -07:00
committed by GitHub
parent dc05ccfd16
commit c54c21e2b4

View File

@@ -4,7 +4,9 @@ const strictGet = (target, name) => {
return target;
}
if (name in target || name === '_reactFragment') {
// '@@toStringTag' is used by propTypes in its internal `isSymbol()` function.
// We can probably remove this exception once we get rid of propTypes.
if (name in target || name === '_reactFragment' || name === '@@toStringTag') {
return target[name];
}