From 2fd224d5cc3ac7ce37e3e60e4d28e19f89321dcd Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Fri, 3 Sep 2021 14:42:30 +0200 Subject: Effect: Define the jQuery variable before jQuery Color gets imported We need to create a local jQuery because jQuery Color relies on it and the global may not exist with AMD and a custom build (trac-10199). This worked in UI 1.12 but stopped in 1.13 as jQuery Color is now sourced as an AMD module and the variable started being defined after jQuery Color code. To restore the proper order, move the variable declaration to a separate small module loaded before jQuery Color. Closes gh-1973 --- ui/effect.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ui/effect.js') diff --git a/ui/effect.js b/ui/effect.js index e2a072d96..37ce230c3 100644 --- a/ui/effect.js +++ b/ui/effect.js @@ -23,6 +23,7 @@ // AMD. Register as an anonymous module. define( [ "jquery", + "./jquery-var-for-color", "./vendor/jquery-color/jquery.color", "./version" ], factory ); @@ -36,11 +37,7 @@ var dataSpace = "ui-effects-", dataSpaceStyle = "ui-effects-style", - dataSpaceAnimated = "ui-effects-animated", - - // Create a local jQuery because jQuery Color relies on it and the - // global may not exist with AMD and a custom build (#10199) - jQuery = $; + dataSpaceAnimated = "ui-effects-animated"; $.effects = { effect: {} -- cgit v1.2.3