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;
|
||||
|
||||
// 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();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user