@@ -54,20 +54,25 @@ const SuggestionsProvider = ({ children }) => {
5454 const getInputBoxPosition = ( ) =>
5555 new Promise ( ( resolve ) => {
5656 const nodeHandleRoot = findNodeHandle ( rootView . current ) ;
57- messageInputBox . current ?. measureLayout (
58- nodeHandleRoot ,
59- ( x , y , width , height ) => {
60- resolve ( { x, y, height, width } ) ;
61- } ,
62- ) ;
57+ messageInputBox . current &&
58+ messageInputBox . current . measureLayout (
59+ nodeHandleRoot ,
60+ ( x , y , width , height ) => {
61+ resolve ( { x, y, height, width } ) ;
62+ } ,
63+ ) ;
6364 } ) ;
6465
6566 const getChatBoxPosition = ( ) =>
6667 new Promise ( ( resolve ) => {
6768 const nodeHandleRoot = findNodeHandle ( rootView . current ) ;
68- rootView . current ?. measureLayout ( nodeHandleRoot , ( x , y , width , height ) => {
69- resolve ( { x, y, height, width } ) ;
70- } ) ;
69+ rootView . current &&
70+ rootView . current . measureLayout (
71+ nodeHandleRoot ,
72+ ( x , y , width , height ) => {
73+ resolve ( { x, y, height, width } ) ;
74+ } ,
75+ ) ;
7176 } ) ;
7277
7378 const suggestionsContext = {
0 commit comments