fix: Fixes an exception when the chat button and shortcut are clicked.
This commit is contained in:
@@ -642,11 +642,16 @@ UI.toggleFilmstrip = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Indicates if the filmstrip is currently visible or not.
|
||||
* @returns {true} if the filmstrip is currently visible, otherwise
|
||||
* Checks if the filmstrip is currently visible or not.
|
||||
* @returns {true} if the filmstrip is currently visible, and false otherwise.
|
||||
*/
|
||||
UI.isFilmstripVisible = () => Filmstrip.isFilmstripVisible();
|
||||
|
||||
/**
|
||||
* @returns {true} if the chat panel is currently visible, and false otherwise.
|
||||
*/
|
||||
UI.isChatVisible = () => Chat.isVisible();
|
||||
|
||||
/**
|
||||
* Toggles chat panel.
|
||||
*/
|
||||
|
||||
@@ -104,7 +104,7 @@ export default function getDefaultButtons() {
|
||||
sendAnalytics(createToolbarEvent(
|
||||
'toggle.chat',
|
||||
{
|
||||
enable: !APP.UI.Chat.isVisible()
|
||||
enable: !APP.UI.isChatVisible()
|
||||
}));
|
||||
APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);
|
||||
},
|
||||
@@ -117,7 +117,7 @@ export default function getDefaultButtons() {
|
||||
sendAnalytics(createShortcutEvent(
|
||||
'toggle.chat',
|
||||
{
|
||||
enable: !APP.UI.Chat.isVisible()
|
||||
enable: !APP.UI.isChatVisible()
|
||||
}));
|
||||
APP.UI.toggleChat();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user