mirror of
https://github.com/discourse/discourse.git
synced 2024-12-19 05:23:53 +08:00
c320c286f9
Co-authored-by: David Taylor <david@taylorhq.com>
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
diff --git a/node_modules/@ember/jquery/vendor/jquery/component.dollar.js b/node_modules/@ember/jquery/vendor/jquery/component.dollar.js
|
|
index 8c0cfd5..4c211e2 100644
|
|
--- a/node_modules/@ember/jquery/vendor/jquery/component.dollar.js
|
|
+++ b/node_modules/@ember/jquery/vendor/jquery/component.dollar.js
|
|
@@ -1,8 +1,16 @@
|
|
import { assert, deprecate } from '@ember/debug';
|
|
-import EmberObject from '@ember/object';
|
|
-import Component from '@ember/component';
|
|
|
|
(function() {
|
|
+ // importing these, specifically, is done so that we don't trigger the
|
|
+ // ember-global deprecation
|
|
+ //
|
|
+ // We had tried to import at the top of this file, but there is a build time transform
|
|
+ // removing those, and re-triggering the ember-global deprecation.
|
|
+ // See: https://deprecations.emberjs.com/v3.x#toc_ember-global
|
|
+ // for more information
|
|
+ const EmberObject = require("@ember/object").default;
|
|
+ const Component = require("@ember/component").default;
|
|
+
|
|
/*
|
|
* This non-standard use of `reopen` and `call` allows the component
|
|
* base class to be reopened without triggering the
|
|
@@ -28,6 +36,8 @@ import Component from '@ember/component';
|
|
);
|
|
|
|
if (this.element) {
|
|
+ // same technique the shim uses
|
|
+ let jQuery = self['jQuery'];
|
|
return sel ? jQuery(sel, this.element) : jQuery(this.element);
|
|
}
|
|
}
|