Fix call header title for direct calls

This commit is contained in:
Evan Hahn 2020-11-23 15:37:39 -06:00 committed by GitHub
parent c54df8be87
commit abc21c8f45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 37 deletions

View file

@ -422,13 +422,13 @@ export class Lightbox extends React.Component<Props, State> {
private readonly onContextMenu = (
event: React.MouseEvent<HTMLImageElement>
) => {
const { contentType } = this.props;
const { contentType = '' } = this.props;
// These are the only image types supported by Electron's NativeImage
if (
event &&
contentType !== 'image/png' &&
!contentType?.match(/image\/jpe?g/g)
!/image\/jpe?g/g.test(contentType)
) {
event.preventDefault();
}