You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChatSession.getTranscript() must always be invoked with an Object argument, even though all arguments are optional:
constsession=connect.ChatSession.create({/* (...) */});// specifying an empty object (i.e. `{}`) is required, even though all arguments are optionalconsttranscript=awaitsession.getTranscript({});
Ideally, this method should be allowed to be invoked without any arguments to achieve the same purpose:
constsession=connect.ChatSession.create({/* (...) */});// this should be allowed, yet this is thrown instead:// Uncaught TypeError: Cannot read properties of undefined (reading 'metadata')consttranscript=awaitsession.getTranscript();
This happens because the inputArgs parameter of ChatController.prototype.getTranscript() is used without any validation:
ChatSession.getTranscript()
must always be invoked with anObject
argument, even though all arguments are optional:Ideally, this method should be allowed to be invoked without any arguments to achieve the same purpose:
This happens because the
inputArgs
parameter ofChatController.prototype.getTranscript()
is used without any validation:amazon-connect-chatjs/src/core/chatController.js
Lines 165 to 167 in d85c517
Proposed fix:
Update
ChatController.prototype.getTranscript()
to makeinputArgs
optional with{}
as the default value:The text was updated successfully, but these errors were encountered: