Fix linting errors
This commit is contained in:
parent
14ad3af30d
commit
3dcdd7a5d7
@ -7,8 +7,8 @@ export default (os: OS) => {
|
||||
|
||||
const cropImage = file => new Promise((resolve, reject) => {
|
||||
|
||||
var regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$')
|
||||
if(!regex.test(file.name) ) {
|
||||
const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$');
|
||||
if (!regex.test(file.name) ) {
|
||||
os.apis.dialog({
|
||||
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
|
||||
text: null,
|
||||
@ -16,7 +16,7 @@ export default (os: OS) => {
|
||||
text: '%i18n:common.got-it%'
|
||||
}]
|
||||
});
|
||||
reject
|
||||
reject();
|
||||
}
|
||||
|
||||
const w = os.new(CropWindow, {
|
||||
|
@ -7,9 +7,8 @@ export default (os: OS) => {
|
||||
|
||||
const cropImage = file => new Promise((resolve, reject) => {
|
||||
|
||||
var regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$')
|
||||
|
||||
if(!regex.test(file.name) ) {
|
||||
const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$');
|
||||
if (!regex.test(file.name) ) {
|
||||
os.apis.dialog({
|
||||
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
|
||||
text: null,
|
||||
@ -17,7 +16,7 @@ export default (os: OS) => {
|
||||
text: '%i18n:common.got-it%'
|
||||
}]
|
||||
});
|
||||
reject
|
||||
reject();
|
||||
}
|
||||
|
||||
const w = os.new(CropWindow, {
|
||||
|
Loading…
Reference in New Issue
Block a user