Use arrow function in form builder manager class
authorMatthias Schmidt <gravatronics@live.com>
Fri, 18 Dec 2020 16:20:28 +0000 (17:20 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 16:20:28 +0000 (17:20 +0100)
Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Manager.ts

index 3feafe7b2cf3b640fecb322aea01ddc71439370d..4f030aafcc04c96097875462e933d9cdbb290ab7 100644 (file)
@@ -31,7 +31,7 @@ export function getData(formId: FieldId): Promise<FormBuilderData> {
 
   const promises: Promise<FormBuilderData>[] = [];
 
-  _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<FormBuilderData> {
     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), {});
   });
 }