Canvas AI: Console error on opening the chatbot
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3572475. -->
Reported by: [akhil babu](https://www.drupal.org/user/3632866)
Related to !893
>>>
<h3 id="overview">Overview</h3>
<p>When loading the chatbot for the first time, I see the following error in the console.</p>
<pre>index.js?ta75r7:199 Uncaught TypeError: Cannot read properties of undefined (reading '1')<br> at t.value (index.js?ta75r7:199:30718)<br> at t.value (index.js?ta75r7:199:31013)<br> at index.js?ta75r7:314:6159</pre><p>Further debugging by enabling the canvas_vite module shows that the error comes from the DeepChat library.</p>
<pre>deep-chat-react.js?v=a2de88dc:2943 Uncaught TypeError: Cannot read properties of undefined (reading '1')<br> at Ze2.getFirstMessageContentEl (deep-chat-react.js?v=a2de88dc:2943:90)<br> at Ze2.scrollToFirstElement (deep-chat-react.js?v=a2de88dc:2951:22)<br> at deep-chat-react.js?v=a2de88dc:12199:22</pre><h3 id="proposed-resolution">Proposed resolution</h3>
<h3 id="ui-changes">User interface changes</h3>
issue