Commit de973206 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benni Mack
Browse files

[BUGFIX] Fix TypeError in InlineControlContainer

In case a TCA column with type=inline does not
contain "container controls", e.g. the `languages`
column in a site configuration, a TypeError was
triggered by the toggleContainerControls() method.

This is fixed by proper type checking.

Resolves: #93690
Releases: master, 10.4
Change-Id: I6dc0a874adddb6e9c56565087b090072656b54eb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68301


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent dc540117
......@@ -794,6 +794,9 @@ class InlineControlContainer {
*/
private toggleContainerControls(visible: boolean): void {
const controlContainer = this.container.querySelector(Selectors.controlContainer);
if (controlContainer === null) {
return;
}
const controlContainerButtons = controlContainer.querySelectorAll('button, a');
controlContainerButtons.forEach((button: HTMLElement): void => {
button.style.display = visible ? null : 'none';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment