microsoft/omnichannel-chat-sdk

[botframework-webchat-control] liveChatContext is undefined on revisit

iMicknl opened this issue · 1 comments

In some scenario's, liveChatContext in Local Storage is undefined. I am not sure why this happens, it could be that liveChatContext is overwritten with undefined when an Internal Server Error is returned by Omnichannel (which happens a lot..).

This will break the chat widget;
Screen Shot 2021-03-21 at 21 23 46

Possible solution:
Make sure we only write to liveChatContext when it is not undefined, or remove the key from liveChatContext.

yeah i've gotten this too. i added a check for 'undefined'