mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Devtools: improve getID guard (#19364)
This commit is contained in:
@@ -165,7 +165,7 @@ export function attach(
|
||||
}
|
||||
|
||||
function getID(internalInstance: InternalInstance): number {
|
||||
if (typeof internalInstance !== 'object') {
|
||||
if (typeof internalInstance !== 'object' || internalInstance === null) {
|
||||
throw new Error('Invalid internal instance: ' + internalInstance);
|
||||
}
|
||||
if (!internalInstanceToIDMap.has(internalInstance)) {
|
||||
|
||||
Reference in New Issue
Block a user