Skip to content

Commit 740a4aa

Browse files
committed
Replace last remaining __proto__: empty hack
We want to allow passing objects with null or normal object prototypes, and were using `__proto__: empty` to indicate that, but I'm not convinced this is at all logical, and does cause issues in some cases (see Flow issue 8685).
1 parent 90c3211 commit 740a4aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

root/static/scripts/common/utility/hasOwnProp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
const objectHasOwnProperty = Object.prototype.hasOwnProperty;
1212

1313
export default function hasOwnProp(
14-
object: {__proto__: empty, ...},
14+
object: {__proto__: null, ...} | {...},
1515
prop: string,
1616
): boolean {
1717
return objectHasOwnProperty.call(object, prop);

0 commit comments

Comments
 (0)