From 1f382a24e271f186af869433a4509e44ea00a745 Mon Sep 17 00:00:00 2001 From: Tim Alby Date: Fri, 7 Jan 2022 11:41:57 +0100 Subject: [PATCH] decaf cleanup: consider reworking code to avoid use of IIFEs GitOrigin-RevId: 8d60da088deac4a19c6b6a03083765af547d9570 --- services/chat/test/acceptance/js/helpers/ChatApp.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/services/chat/test/acceptance/js/helpers/ChatApp.js b/services/chat/test/acceptance/js/helpers/ChatApp.js index 2a37d730a0..b8d4f05646 100644 --- a/services/chat/test/acceptance/js/helpers/ChatApp.js +++ b/services/chat/test/acceptance/js/helpers/ChatApp.js @@ -3,7 +3,6 @@ /* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from - * DS205: Consider reworking code to avoid use of IIFEs * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ @@ -31,13 +30,9 @@ module.exports = { throw error } this.running = true - return (() => { - const result = [] - for (callback of Array.from(this.callbacks)) { - result.push(callback()) - } - return result - })() + for (callback of Array.from(this.callbacks)) { + callback() + } }) }) },