Skip to content

Commit

Permalink
Add nullcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
piaskowyk authored and tomekzaw committed Jan 10, 2025
1 parent d9f6dcc commit 13005b4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ type HostInstancePaper = {

export type HostInstance = HostInstanceFabric & HostInstancePaper;

function findHostInstanceFastPath(maybeNativeRef: HostInstance) {
function findHostInstanceFastPath(maybeNativeRef: HostInstance | undefined) {
if (!maybeNativeRef) {
return undefined;
}
if (
maybeNativeRef.__internalInstanceHandle &&
maybeNativeRef.__nativeTag &&
Expand Down

0 comments on commit 13005b4

Please sign in to comment.