[BUGFIX] RTE: JS exception regarding property disableStyleOnOptionLabel 16/33916/2
authorStanislas Rolland <typo3@sjbr.ca>
Sun, 9 Nov 2014 04:45:27 +0000 (23:45 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Sun, 9 Nov 2014 04:46:53 +0000 (05:46 +0100)
Problem: BlockStyle plugin checks for property
this.pageTSconfiguration.disableStyleOnOptionLabel without checking
first that this.pageTSconfiguration exists at all.

Releases: master. 6.2
Resolves: #59574
Change-Id: Ic2554e44e6212475826d649416377f6c307df8db
Reviewed-on: http://review.typo3.org/33916
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js

index bc11b52..8d9af70 100644 (file)
@@ -240,7 +240,7 @@ HTMLArea.BlockStyle = Ext.extend(HTMLArea.Plugin, {
                        }
                        Ext.iterate(allowedClasses, function (cssClass, value) {
                                var style = null;
-                               if (!this.pageTSconfiguration.disableStyleOnOptionLabel) {
+                               if (!this.pageTSconfiguration || !this.pageTSconfiguration.disableStyleOnOptionLabel) {
                                        if (HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) {
                                                style = HTMLArea.classesValues[cssClass];
                                        } else if (/-[0-9]+$/.test(cssClass) && HTMLArea.classesValues[RegExp.leftContext + '-'])  {