separate checking JPG and JPEG formats in getTargetFormat (#4544)

* separate checking JPG and JPEG  formats in getTargetFormat

* stack the 2 cases together
This commit is contained in:
Nikolay Tsonev
2017-07-12 18:09:15 +03:00
committed by Alexander Vakrilov
parent 3dbcf088be
commit 23fe7d4177

View File

@ -205,7 +205,8 @@ export class ImageSource implements ImageSourceDefinition {
function getTargetFormat(format: "png" | "jpeg" | "jpg"): android.graphics.Bitmap.CompressFormat {
switch (format) {
case "jpeg" || "jpg":
case "jpeg":
case "jpg":
return android.graphics.Bitmap.CompressFormat.JPEG;
default:
return android.graphics.Bitmap.CompressFormat.PNG;