[FOLLOWUP][BUGFIX] Allow empty values for js language labels 10/46310/2
authorFrank Naegler <frank.naegler@typo3.org>
Thu, 28 Jan 2016 23:12:56 +0000 (00:12 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 28 Jan 2016 23:14:06 +0000 (00:14 +0100)
This patch is a followup patch to fix broken labels in
BackendLayoutWizard.

Resolves: #72806
Releases: master, 7.6
Change-Id: I10be021ad578c21821f088323be5cf05aa74928b
Reviewed-on: https://review.typo3.org/46310
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/lang/Resources/Public/JavaScript/Lang.js

index 8651ae4..360d91b 100644 (file)
@@ -32,7 +32,7 @@ define(['jquery'], function($) {
                var originalLangObject = $.extend(true, {}, TYPO3.lang);
                TYPO3.lang = [];
                $.each(originalLangObject, function(index, value) {
                var originalLangObject = $.extend(true, {}, TYPO3.lang);
                TYPO3.lang = [];
                $.each(originalLangObject, function(index, value) {
-                       if (typeof value !== "undefined" && typeof value[0] !== "undefined") {
+                       if (typeof value === "object") {
                                TYPO3.lang[index] = value[0].target || value[0].source;
                        } else {
                                TYPO3.lang[index] = value;
                                TYPO3.lang[index] = value[0].target || value[0].source;
                        } else {
                                TYPO3.lang[index] = value;