From b8c254e85a794a5deae2c4471d6b6427b4eff918 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 13 Jan 2017 19:53:29 +0100 Subject: [PATCH] Support jQuery plugins utilizing AMD --- wcfsetup/install/files/js/require.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/js/require.config.js b/wcfsetup/install/files/js/require.config.js index e0c2be8ad6..a313b04f39 100644 --- a/wcfsetup/install/files/js/require.config.js +++ b/wcfsetup/install/files/js/require.config.js @@ -44,3 +44,12 @@ requirejs.config({ } } }); + +/* Define jQuery shim. We cannot use the shim object in the configuration above, + because it tries to load the file, even if the exported global already exists. + This shim is needed for jQuery plugins supporting an AMD loaded jQuery, because + we break the AMD support of jQuery for BC reasons. +*/ +define('jquery', function() { + return window.jQuery; +}); -- 2.20.1