mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Prevent extensions to fiber in DEV
Helps us avoid accidentally adding fields to the fiber class
This commit is contained in:
1 parent
91e8081cf0
commit
ddf59c403a
1 file changed
+4
@@ -223,8 +223,12 @@ var createFiber = function(tag : TypeOfWork, key : null | string) : Fiber {
|
||||
fiber._debugID = debugCounter++;
|
||||
fiber._debugSource = null;
|
||||
fiber._debugOwner = null;
|
||||
if (typeof Object.preventExtensions === 'function') {
|
||||
Object.preventExtensions(fiber);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return fiber;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user