[BUGFIX] RTE: formatblock configuration may raise JavaScript error 05/37805/3
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 18 Mar 2015 21:38:56 +0000 (17:38 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 19 Mar 2015 16:42:42 +0000 (17:42 +0100)
The RTE then fails to load.
Solution: Check for the presence of configured formatblock options.

Releases: master
Resolves: #65710
Change-Id: I16045aa4ef02400b71ad0109acf2ff4ed1304ff0
Reviewed-on: http://review.typo3.org/37805
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/BlockElements.js

index ba5ed0e..b61395d 100644 (file)
@@ -109,7 +109,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/BlockElements',
                        var dropDownConfiguration = {
                                id: buttonId,
                                tooltip: this.localize(buttonId + '-Tooltip'),
-                               options: this.buttonsConfiguration.formatblock ? this.buttonsConfiguration.formatblock.options : [],
+                               options: this.buttonsConfiguration.formatblock && this.buttonsConfiguration.formatblock.options? this.buttonsConfiguration.formatblock.options : [],
                                action: 'onChange'
                        };
                        if (this.buttonsConfiguration.formatblock) {