Fix <CallScreen> stories

This commit is contained in:
Evan Hahn 2021-06-04 09:55:18 -05:00 committed by GitHub
parent 2e3f0831bd
commit e61354fd55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,9 +6,12 @@ import { isBeta } from './version';
// We can remove this function once screen sharing has been turned on for everyone
export function isScreenSharingEnabled(): boolean {
return (
// `window.getVersion` is missing in Storybook.
const version = window.getVersion?.();
return Boolean(
RemoteConfig.isEnabled('desktop.worksAtSignal') ||
RemoteConfig.isEnabled('desktop.screensharing2') ||
isBeta(window.getVersion())
RemoteConfig.isEnabled('desktop.screensharing2') ||
(version && isBeta(version))
);
}