File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
services/static-webserver/client/source/class/osparc/conversation Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -270,10 +270,13 @@ qx.Class.define("osparc.conversation.Conversation", {
270270 }
271271 this . __messages . splice ( messageIndex , 1 ) ;
272272
273- // remove the ui element
274- const index = this . __messagesList . getChildren ( ) . findIndex ( control => ( "getMessage" in control && control . getMessage ( ) [ "messageId" ] === message [ "messageId" ] ) ) ;
275- if ( index > - 1 ) {
276- this . __messagesList . getChildren ( ) . removeAt ( index ) ;
273+ // Remove the UI element from the messages list
274+ const children = this . __messagesList . getChildren ( ) ;
275+ const controlIndex = children . findIndex (
276+ ctrl => ( "getMessage" in ctrl && ctrl . getMessage ( ) [ "messageId" ] === message [ "messageId" ] )
277+ ) ;
278+ if ( controlIndex > - 1 ) {
279+ this . __messagesList . remove ( children [ controlIndex ] ) ;
277280 }
278281
279282 this . __updateMessagesNumber ( ) ;
You can’t perform that action at this time.
0 commit comments