fix: Fixes an exception when the chat button and shortcut are clicked.

This commit is contained in:
Boris Grozev 2018-01-09 08:59:44 -08:00 committed by bgrozev
parent 64c5ae1c48
commit a3cb081609
2 changed files with 9 additions and 4 deletions

View File

@ -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.
*/

View File

@ -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();
},