Skip to content

Commit 86b4ad1

Browse files
committed
Merge branch 'feat/crop-fix' into 'master'
Fix errors from Firebase functions linter See merge request fmasa/wfrp-master!220
2 parents 88f2944 + 0043543 commit 86b4ad1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

firebase.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"functions": {
3535
"predeploy": [
3636
"npm --prefix \"$RESOURCE_DIR\" install",
37-
"npm --prefix \"$RESOURCE_DIR\" run lint",
3837
"npm --prefix \"$RESOURCE_DIR\" run build"
3938
],
4039
"source": "functions"

functions/src/functions/changeCharacterAvatar.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import * as sharp from "sharp";
77
import * as t from "io-ts";
88
import {UploadResponse} from "@google-cloud/storage/build/src/bucket";
99
import {Bucket} from "@google-cloud/storage";
10-
import {Sharp} from "sharp";
1110

12-
const imageSize = 500
11+
const imageSize = 500;
1312

1413
const RequestBody = t.interface({
1514
partyId: t.string,
@@ -82,12 +81,12 @@ export const changeCharacterAvatar = functions.https.onCall(async (data, context
8281
};
8382
});
8483

85-
const cropToRectangle = async (image: Sharp): Promise<Sharp> => {
84+
const cropToRectangle = async (image: sharp.Sharp): Promise<Sharp> => {
8685
const metadata = await image.metadata();
8786
const width = metadata.width;
8887
const height = metadata.height;
8988

90-
if (width == undefined || height == undefined) {
89+
if (width === undefined || height === undefined) {
9190
console.error("Could not read image width and height");
9291

9392
return image;

0 commit comments

Comments
 (0)