From: Matthias Schmidt Date: Fri, 18 Dec 2020 16:20:28 +0000 (+0100) Subject: Use arrow function in form builder manager class X-Git-Tag: 5.4.0_Alpha_1~526^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=728511c52c2f5ba0a50f7901eab7f6a496df0496;p=GitHub%2FWoltLab%2FWCF.git Use arrow function in form builder manager class Co-authored-by: Tim Düsterhus --- 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), {}); }); }