summaryrefslogtreecommitdiff
path: root/resources/js/jquery-shims.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/jquery-shims.js')
-rw-r--r--resources/js/jquery-shims.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/resources/js/jquery-shims.js b/resources/js/jquery-shims.js
new file mode 100644
index 0000000000..54a06b458e
--- /dev/null
+++ b/resources/js/jquery-shims.js
@@ -0,0 +1,8 @@
+// jQuery 4 removed these utilities; shim them for legacy plugins (corejs-typeahead, jquery-colorbox).
+import $ from 'jquery';
+
+$.isArray = Array.isArray;
+$.isFunction = function (obj) { return typeof obj === 'function'; };
+$.proxy = function (fn, context) { return fn.bind(context); };
+
+window.$ = window.jQuery = $;