From: Tim Düsterhus Date: Mon, 25 May 2015 00:45:43 +0000 (+0200) Subject: Shim enquire and Favico to work around race condition X-Git-Tag: 3.0.0_Beta_1~2310^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7efb5f7c3981f949b5e492723213678c0d5b00f1;p=GitHub%2FWoltLab%2FWCF.git Shim enquire and Favico to work around race condition If enquire and Favico are loaded before define.amd is nulled: Fine If they are loaded after define.amd was nulled: They're shimmed and everything is fine as well. --- diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl index 11c907d63e..dfa75709f4 100644 --- a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -24,17 +24,6 @@ requirejs.config({ {/if} @@ -155,9 +142,6 @@ requirejs.config({ - {else} {/if} diff --git a/wcfsetup/install/files/js/require.config.js b/wcfsetup/install/files/js/require.config.js index bfc9aeb85f..c1a868f0ae 100644 --- a/wcfsetup/install/files/js/require.config.js +++ b/wcfsetup/install/files/js/require.config.js @@ -4,6 +4,11 @@ requirejs.config({ favico: '3rdParty/favico', 'perfect-scrollbar': '3rdParty/perfect-scrollbar' }, + shim: { + enquire: { exports: 'enquire' }, + favico: { exports: 'Favico' }, + 'perfect-scrollbar': { exports: 'PerfectScrollbar' } + }, map: { '*': { 'Ajax': 'WoltLab/WCF/Ajax',