[BUGFIX] Load requireJS when requested 38/52638/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:55:30 +0000 (15:55 +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/52638
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Page/PageRenderer.php

index 194bbff..0b4290a 100644 (file)
@@ -1460,10 +1460,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();