Fix the access to the prototype during the object initialization
authorAlexander Ebert <ebert@woltlab.com>
Thu, 8 Dec 2022 17:06:31 +0000 (18:06 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 8 Dec 2022 17:06:31 +0000 (18:06 +0100)
commita4e3ea3117209c624ae2f3bb9be4d04c5234cb5d
tree371685d4f46c8032893111bb429e3a74dadea213
parenta98110c01fa2480bc4ce4ee12c4d95d79051b38e
Fix the access to the prototype during the object initialization

`_readField()` is implicitly called in the constructor of the parent class. This is effectively an attempt to access `this` while `super()` is still running which is a silent violation of the specs.

The `_fields` property in line 15 is actually implicitly declared in the constructor *after* `super()` has completed.

JavaScript’s technical debts strike again.
ts/WoltLabSuite/Core/Form/Builder/Field/RadioButton.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/RadioButton.js