From abc296cdcc73d0e039286a9107ea8b36f02ceae3 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 23 May 2020 23:21:09 +0900 Subject: refactor: use Object.fromEntries() instead of in-house implementation (#6401) * refactor: use Object.fromEntries() instead of in-house implementation * Remove extra type assertions --- src/client/scripts/compose-notification.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/client/scripts/compose-notification.ts') 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 => 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) -- cgit v1.2.3-freya