diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-01-21 11:23:32 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-01-21 11:23:32 +0900 |
| commit | e9ebc5151d1c9d5c2a82ceebf9d6edd1d4d5aa90 (patch) | |
| tree | c15c3115be31655cf754036167b036a1e954045b /src | |
| parent | Update CHANGELOG.md (diff) | |
| download | sharkey-e9ebc5151d1c9d5c2a82ceebf9d6edd1d4d5aa90.tar.gz sharkey-e9ebc5151d1c9d5c2a82ceebf9d6edd1d4d5aa90.tar.bz2 sharkey-e9ebc5151d1c9d5c2a82ceebf9d6edd1d4d5aa90.zip | |
[Server] Fix bug: リモートユーザーのアイコンが消えることがある問題を修正
Diffstat (limited to 'src')
| -rw-r--r-- | src/misc/cafy-id.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc/cafy-id.ts b/src/misc/cafy-id.ts index 621f7e7948..b99a27ee4a 100644 --- a/src/misc/cafy-id.ts +++ b/src/misc/cafy-id.ts @@ -5,7 +5,8 @@ import isObjectId from './is-objectid'; export const isAnId = (x: any) => mongo.ObjectID.isValid(x); export const isNotAnId = (x: any) => !isAnId(x); export const transform = (x: string | mongo.ObjectID): mongo.ObjectID => { - if (x == null) return null; + if (x === undefined) return undefined; + if (x === null) return null; if (isAnId(x) && !isObjectId(x)) { return new mongo.ObjectID(x); |