[BUGFIX] Avoid that TYPO3 namespace is cleared
authorTolleiv Nietsch <info@tolleiv.de>
Fri, 7 Oct 2011 08:01:26 +0000 (10:01 +0200)
committerTolleiv Nietsch <info@tolleiv.de>
Mon, 10 Oct 2011 23:33:34 +0000 (01:33 +0200)
During the preview the TYPO3 JS namespace is cleared.
This is made to make sure that it always exists. But in case it's
already loaded, it's cleared by accident. The patch takes care of
both situations

Change-Id: I5c0a367764adf2ee62a145d6634a6990687c3cea
Resolves: #30307
Branches: 4.6
Reviewed-on: http://review.typo3.org/5605
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/workspaces/Resources/Private/Templates/Preview/Preview.html

index eee6054..2629a2a 100644 (file)
@@ -8,7 +8,7 @@
        var asNumber = function(val) {
                return isNaN(val) ? 0 : parseInt(val, 10);
        };
-       var TYPO3 = {};
+       var TYPO3 = TYPO3 || {};
        TYPO3.ready = function () {
                // make sure we're in the workspace preview module
                if (typeof parent.resize == 'function') {