From ea92254b731807fe7bc4bfe45339007459f5c91c Mon Sep 17 00:00:00 2001 From: noonworks Date: Mon, 20 Feb 2023 08:13:37 +0900 Subject: refactor: 型エラー修正 / Fix type errors backend (#9983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: fix type errors in backend * revert some changes * なるべくJS挙動を変えない方法に修正 * Update packages/backend/src/server/api/ApiCallService.ts Co-authored-by: Acid Chicken (硫酸鶏) * コンフリクトするファイルを削除 --------- Co-authored-by: Acid Chicken (硫酸鶏) --- packages/backend/src/core/PushNotificationService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/backend/src/core') diff --git a/packages/backend/src/core/PushNotificationService.ts b/packages/backend/src/core/PushNotificationService.ts index 75bf4b0e01..4b7ca5c968 100644 --- a/packages/backend/src/core/PushNotificationService.ts +++ b/packages/backend/src/core/PushNotificationService.ts @@ -23,7 +23,7 @@ type pushNotificationsTypes = { // Reduce length because push message servers have character limits function truncateBody(type: T, body: pushNotificationsTypes[T]): pushNotificationsTypes[T] { - if (body === undefined) return body; + if (typeof body !== 'object') return body; return { ...body, -- cgit v1.2.3-freya