From 7efb5f7c3981f949b5e492723213678c0d5b00f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 25 May 2015 02:45:43 +0200 Subject: [PATCH] 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. --- .../templates/headIncludeJavaScript.tpl | 16 ---------------- wcfsetup/install/files/js/require.config.js | 5 +++++ 2 files changed, 5 insertions(+), 16 deletions(-) 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', -- 2.20.1