mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Fix MIME check for JPEG in lightbox copy handler (#4643)
* Fix MIME check for JPEG in lightbox copy handler * Handle both image/jpeg and non-standard image/jpg
This commit is contained in:
@@ -425,7 +425,11 @@ export class Lightbox extends React.Component<Props, State> {
|
|||||||
const { contentType } = this.props;
|
const { contentType } = this.props;
|
||||||
|
|
||||||
// These are the only image types supported by Electron's NativeImage
|
// These are the only image types supported by Electron's NativeImage
|
||||||
if (event && contentType !== 'image/png' && contentType !== 'image/jpg') {
|
if (
|
||||||
|
event &&
|
||||||
|
contentType !== 'image/png' &&
|
||||||
|
!contentType?.match(/image\/jpe?g/g)
|
||||||
|
) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user