diff options
| author | noonworks <noonworks@gmail.com> | 2023-02-20 08:13:37 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-20 08:13:37 +0900 |
| commit | ea92254b731807fe7bc4bfe45339007459f5c91c (patch) | |
| tree | b5c239b0dd5e53e42529773c0b1fdb84cac6f70e /packages/backend/src/core/PushNotificationService.ts | |
| parent | fix typescript version on vscode (diff) | |
| download | sharkey-ea92254b731807fe7bc4bfe45339007459f5c91c.tar.gz sharkey-ea92254b731807fe7bc4bfe45339007459f5c91c.tar.bz2 sharkey-ea92254b731807fe7bc4bfe45339007459f5c91c.zip | |
refactor: 型エラー修正 / Fix type errors backend (#9983)
* refactor: fix type errors in backend
* revert some changes
* なるべくJS挙動を変えない方法に修正
* Update packages/backend/src/server/api/ApiCallService.ts
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* コンフリクトするファイルを削除
---------
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Diffstat (limited to 'packages/backend/src/core/PushNotificationService.ts')
| -rw-r--r-- | packages/backend/src/core/PushNotificationService.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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<T extends keyof pushNotificationsTypes>(type: T, body: pushNotificationsTypes[T]): pushNotificationsTypes[T] { - if (body === undefined) return body; + if (typeof body !== 'object') return body; return { ...body, |