Skip to content

Commit

Permalink
Devtools: improve getID guard (#19364)
Browse files Browse the repository at this point in the history
  • Loading branch information
trueadm authored Jul 15, 2020
1 parent 392277f commit 45eef8b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 45eef8b

Please sign in to comment.