diff --git a/services/chat/app/js/Features/Messages/MessageFormatter.js b/services/chat/app/js/Features/Messages/MessageFormatter.js index d868dca75c..ccad55d1a7 100644 --- a/services/chat/app/js/Features/Messages/MessageFormatter.js +++ b/services/chat/app/js/Features/Messages/MessageFormatter.js @@ -1,10 +1,3 @@ -// TODO: This file was created by bulk-decaffeinate. -// Fix any style issues and re-enable lint. -/* - * decaffeinate suggestions: - * DS101: Remove unnecessary use of Array.from - * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md - */ let MessageFormatter module.exports = MessageFormatter = { formatMessageForClientSide(message) { @@ -25,15 +18,13 @@ module.exports = MessageFormatter = { }, formatMessagesForClientSide(messages) { - return Array.from(messages).map(message => - this.formatMessageForClientSide(message) - ) + return messages.map(message => this.formatMessageForClientSide(message)) }, groupMessagesByThreads(rooms, messages) { let room, thread const roomsById = {} - for (room of Array.from(rooms)) { + for (room of rooms) { roomsById[room._id.toString()] = room } @@ -54,7 +45,7 @@ module.exports = MessageFormatter = { } } - for (const message of Array.from(messages)) { + for (const message of messages) { room = roomsById[message.room_id.toString()] if (room) { thread = getThread(room) diff --git a/services/chat/test/acceptance/js/helpers/ChatApp.js b/services/chat/test/acceptance/js/helpers/ChatApp.js index 14f4c7454e..66176b5bf1 100644 --- a/services/chat/test/acceptance/js/helpers/ChatApp.js +++ b/services/chat/test/acceptance/js/helpers/ChatApp.js @@ -1,10 +1,3 @@ -// TODO: This file was created by bulk-decaffeinate. -// Fix any style issues and re-enable lint. -/* - * decaffeinate suggestions: - * DS101: Remove unnecessary use of Array.from - * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md - */ const { waitForDb } = require('../../../../app/js/mongodb') const app = require('../../../../app') @@ -29,7 +22,7 @@ module.exports = { throw error } this.running = true - for (callback of Array.from(this.callbacks)) { + for (callback of this.callbacks) { callback() } })