Protectt ourselves against interfaceConfig being undeclared. typeof interfaceConfig will return "undefined", but that's different than having some window.interfaceConfig = undefined, even though the valus is the same. The former will give a ReferenceError.
13 lines
283 B
JavaScript
13 lines
283 B
JavaScript
// @flow
|
|
|
|
declare var interfaceConfig: Object;
|
|
|
|
/**
|
|
* Tells wether presence status should be displayed.
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
export function presenceStatusDisabled() {
|
|
return Boolean(typeof interfaceConfig !== 'undefined' && interfaceConfig?.DISABLE_PRESENCE_STATUS);
|
|
}
|