[BUGFIX] Load requireJS when requested 37/52637/2
authorMarkus Klein <markus.klein@typo3.org>
Thu, 27 Apr 2017 13:11:00 +0000 (15:11 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 27 Apr 2017 13:45:47 +0000 (15:45 +0200)
When using requireJS in FE the method loadRequireJs() is called
implicitly when requiring modules.
A refactoring introduced a regression which causes the basic
requireJS code not to be loaded anymore.

Switch the lines to make this work again.

Releases: master, 8.7
Resolves: #81046
Change-Id: Ie511116a9a01c5c4b906f1e16712afa9f023d434
Reviewed-on: https://review.typo3.org/52637
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Johannes Kasberger <johannes.kasberger@reelworx.at>
Tested-by: Johannes Kasberger <johannes.kasberger@reelworx.at>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Tested-by: Thomas Hohn <thomas@hohn.dk>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Page/PageRenderer.php

index 2ed215d..062df50 100644 (file)
@@ -1459,10 +1459,10 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function loadRequireJs()
     {
+        $this->addRequireJs = true;
         if (!empty($this->requireJsConfig)) {
             return;
         }
-        $this->addRequireJs = true;
 
         $loadedExtensions = ExtensionManagementUtility::getLoadedExtensionListArray();
         $isDevelopment = GeneralUtility::getApplicationContext()->isDevelopment();