mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-11 13:06:06 +02:00
8de41a414d
The deployment will generate the right one based on the provided name and email. Fixes: https://github.com/jitsi/jitsi-meet-electron/issues/379
21 lines
537 B
JavaScript
21 lines
537 B
JavaScript
// @flow
|
|
|
|
/**
|
|
* Get's the value for the given setting, providing a default value.
|
|
*
|
|
* @param {Object} state - The redux state.
|
|
* @param {string} setting - The name for the desired setting.
|
|
* @param {*} defaultValue - The default value, in case the setting is
|
|
* undefined.
|
|
* @returns {*} The setting value.
|
|
*/
|
|
export function getSetting(state: Object, setting: string, defaultValue: any) {
|
|
const value = state.settings[setting];
|
|
|
|
if (typeof value === 'undefined') {
|
|
return defaultValue;
|
|
}
|
|
|
|
return value;
|
|
}
|