mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-17 18:17:29 +03:00
Undefined check in serializer utils
Summary: Release notes: none `proto` should be checked before being accessed, not sure why Flow didn't pick up on this one either. This bug occurred only during UFI code, but it unblocks the work there. Closes https://github.com/facebook/prepack/pull/1610 Differential Revision: D7315572 Pulled By: trueadm fbshipit-source-id: 8989d70952e9017501f4d261e648f371b96cad24
This commit is contained in:
parent
ba29f3c7e1
commit
92d6fee5c8
@ -119,7 +119,7 @@ export function getObjectPrototypeMetadata(realm: Realm, obj: ObjectValue) {
|
||||
if (obj.$IsClassPrototype) {
|
||||
skipPrototype = true;
|
||||
}
|
||||
if (proto.$IsClassPrototype) {
|
||||
if (proto && proto.$IsClassPrototype) {
|
||||
invariant(proto instanceof ObjectValue);
|
||||
// we now need to check if the prototpe has a constructor
|
||||
if (proto.properties.has("constructor")) {
|
||||
|
Loading…
Reference in New Issue
Block a user