diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2022-07-04 15:26:21 +0000 |
|---|---|---|
| committer | tamaina <tamaina@hotmail.co.jp> | 2022-07-04 15:26:21 +0000 |
| commit | 2fe4a51d26bd2b5429528b8773ace408b44b4092 (patch) | |
| tree | 91cbe02f75ccf2b82bdda4bca90c84aba9e5d195 /packages/client/src/scripts/array.ts | |
| parent | update CHANGELOG.md (diff) | |
| parent | Add additional drive capacity change support (#8867) (diff) | |
| download | sharkey-2fe4a51d26bd2b5429528b8773ace408b44b4092.tar.gz sharkey-2fe4a51d26bd2b5429528b8773ace408b44b4092.tar.bz2 sharkey-2fe4a51d26bd2b5429528b8773ace408b44b4092.zip | |
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
Diffstat (limited to 'packages/client/src/scripts/array.ts')
| -rw-r--r-- | packages/client/src/scripts/array.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/client/src/scripts/array.ts b/packages/client/src/scripts/array.ts index 29d027de14..26c6195d66 100644 --- a/packages/client/src/scripts/array.ts +++ b/packages/client/src/scripts/array.ts @@ -98,7 +98,7 @@ export function groupOn<T, S>(f: (x: T) => S, xs: T[]): T[][] { export function groupByX<T>(collections: T[], keySelector: (x: T) => string) { return collections.reduce((obj: Record<string, T[]>, item: T) => { const key = keySelector(item); - if (!obj.hasOwnProperty(key)) { + if (typeof obj[key] === 'undefined') { obj[key] = []; } |