mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
add null-guard for Autocomplete containerRef
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -260,7 +260,7 @@ export default class Autocomplete extends React.PureComponent<IProps, IState> {
|
|||||||
behavior: "auto",
|
behavior: "auto",
|
||||||
block: "nearest",
|
block: "nearest",
|
||||||
});
|
});
|
||||||
} else {
|
} else if (this.containerRef.current) {
|
||||||
this.containerRef.current.scrollTo({ top: 0 });
|
this.containerRef.current.scrollTo({ top: 0 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user