[BUGFIX] TypeError: this.I18N was undefined in backend 80/40480/4
authorFrank Nägler <typo3@naegler.net>
Sat, 20 Jun 2015 10:03:05 +0000 (12:03 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 20 Jun 2015 11:02:52 +0000 (13:02 +0200)
Fixed JS Error in backend.
Can be verified in EXT:styleguide mega record.

Resolves: #67644
Releases: master
Change-Id: Ib549594c46c8e81d7e048d617353abe20e29d08d
Reviewed-on: http://review.typo3.org/40480
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js

index 41f926c..7a97319 100644 (file)
@@ -37,10 +37,9 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
                this.editorId = editor.editorId;
                this.editorConfiguration = editor.config;
                this.name = pluginName;
-               try {
+               this.I18N = {};
+               if (typeof HTMLArea.I18N !== 'undefined' && typeof HTMLArea.I18N[this.name] !== 'undefined') {
                        this.I18N = HTMLArea.I18N[this.name];
-               } catch(e) {
-                       this.I18N = new Object();
                }
                this.configurePlugin(editor);
        };