diff --git a/spec/config/i18n.spec.ts b/spec/config/i18n.spec.ts index 908724cf..f926f6f9 100644 --- a/spec/config/i18n.spec.ts +++ b/spec/config/i18n.spec.ts @@ -6,7 +6,7 @@ const locales = ['de', 'fr', 'it', 'ja', 'ko', 'pl', 'zh_cn'] describe('i18n', () => { describe('should not define duplicate keys', () => { - locales.map(locale => { + locales.forEach(locale => { it(`${locale} translation`, () => { const targetJson = JSON.parse( fs.readFileSync(path.resolve(__dirname, `../../src/config/locales/${locale}/translation.json`), 'utf8') diff --git a/src/main/index.ts b/src/main/index.ts index ca712ec9..811dbf6e 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -663,7 +663,7 @@ ipcMain.on('start-all-user-streamings', (event: IpcMainEvent, accounts: Array { - Object.keys(userStreamings).map((key: string) => { + Object.keys(userStreamings).forEach((key: string) => { if (userStreamings[key]) { userStreamings[key]!.stop() userStreamings[key] = null @@ -676,7 +676,7 @@ ipcMain.on('stop-all-user-streamings', () => { * @param id specified user id in nedb. */ const stopUserStreaming = (id: string) => { - Object.keys(userStreamings).map((key: string) => { + Object.keys(userStreamings).forEach((key: string) => { if (key === id && userStreamings[id]) { userStreamings[id]!.stop() userStreamings[id] = null diff --git a/src/renderer/store/TimelineSpace/Modals/NewToot.ts b/src/renderer/store/TimelineSpace/Modals/NewToot.ts index cc2b5ec3..a7356a09 100644 --- a/src/renderer/store/TimelineSpace/Modals/NewToot.ts +++ b/src/renderer/store/TimelineSpace/Modals/NewToot.ts @@ -234,7 +234,7 @@ const actions: ActionTree = { } if (params.polls.length > 1) { - params.polls.map(poll => { + params.polls.forEach(poll => { if (poll.length < 1) { throw new NewTootPollInvalid() } @@ -297,7 +297,7 @@ const actions: ActionTree = { commit(MUTATION_TYPES.UPDATE_INITIAL_SPOILER, message.spoiler_text) commit(MUTATION_TYPES.CHANGE_MODAL, true) let value: number = Visibility.Public.value - Object.keys(Visibility).map(key => { + Object.keys(Visibility).forEach(key => { const target = Visibility[key] if (target.key === message.visibility) { value = target.value