From 728511c52c2f5ba0a50f7901eab7f6a496df0496 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 18 Dec 2020 17:20:28 +0100 Subject: [PATCH] Use arrow function in form builder manager class MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- .../files/ts/WoltLabSuite/Core/Form/Builder/Manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Manager.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Manager.ts index 3feafe7b2c..4f030aafcc 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Manager.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Manager.ts @@ -31,7 +31,7 @@ export function getData(formId: FieldId): Promise { const promises: Promise[] = []; - _fields.get(formId)!.forEach(function (field) { + _fields.get(formId)!.forEach((field) => { const fieldData = field.getData(); if (!(fieldData instanceof Promise)) { @@ -41,7 +41,7 @@ export function getData(formId: FieldId): Promise { promises.push(fieldData); }); - return Promise.all(promises).then(function (promiseData: FormBuilderData[]) { + return Promise.all(promises).then((promiseData: FormBuilderData[]) => { return promiseData.reduce((carry, current) => Core.extend(carry, current), {}); }); } -- 2.20.1