Devtools: improve getID guard (#19364)

This commit is contained in:
Dominic Gannaway authored and GitHub committed 2020-07-15 14:17:48 +01:00
1 parent 392277f0ab
commit 45eef8b6b5
1 file changed
+1 -1
@@ -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)) {