diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2020-05-23 23:21:09 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-23 23:21:09 +0900 |
| commit | abc296cdcc73d0e039286a9107ea8b36f02ceae3 (patch) | |
| tree | 239105c1d81c9a009cfe2481b8daa2d24d3fe70e /src/client/scripts/compose-notification.ts | |
| parent | Drop support for Node v11, v13 (#6402) (diff) | |
| download | sharkey-abc296cdcc73d0e039286a9107ea8b36f02ceae3.tar.gz sharkey-abc296cdcc73d0e039286a9107ea8b36f02ceae3.tar.bz2 sharkey-abc296cdcc73d0e039286a9107ea8b36f02ceae3.zip | |
refactor: use Object.fromEntries() instead of in-house implementation (#6401)
* refactor: use Object.fromEntries()
instead of in-house implementation
* Remove extra type assertions
Diffstat (limited to 'src/client/scripts/compose-notification.ts')
| -rw-r--r-- | src/client/scripts/compose-notification.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/scripts/compose-notification.ts b/src/client/scripts/compose-notification.ts index 29eb515bfe..c3281955e4 100644 --- a/src/client/scripts/compose-notification.ts +++ b/src/client/scripts/compose-notification.ts @@ -1,13 +1,12 @@ import getNoteSummary from '../../misc/get-note-summary'; import getUserName from '../../misc/get-user-name'; import { clientDb, get, bulkGet } from '../db'; -import { fromEntries } from '../../prelude/array'; const getTranslation = (text: string): Promise<string> => get(text, clientDb.i18n); export default async function(type, data): Promise<[string, NotificationOptions]> { const contexts = ['deletedNote', 'invisibleNote', 'withNFiles', '_cw.poll']; - const locale = fromEntries(await bulkGet(contexts, clientDb.i18n) as [string, string][]); + const locale = Object.fromEntries(await bulkGet(contexts, clientDb.i18n) as [string, string][]); switch (type) { case 'driveFileCreated': // TODO (Server Side) |