Skip to content
Permalink
Browse files

Support for importing jQuery

Also remove Ember.Qunit error about Ember.$ for now
  • Loading branch information...
eviltrout committed Oct 23, 2019
1 parent 39159ad commit 9347108f0294916e43aeb70b8c60e944132e2234
@@ -5,6 +5,7 @@ var define, requirejs;
var EMBER_MODULES = {};
if (typeof Ember !== "undefined") {
EMBER_MODULES = {
jquery: { default: $ },
"@ember/component": { default: Ember.Component },
"@ember/controller": { default: Ember.Controller },
"@ember/object": { default: Ember.Object },
@@ -1,4 +1,5 @@
import getUrl from "discourse-common/lib/get-url";
import jQuery from "jquery";

let token;

@@ -16,6 +17,6 @@ export function ajax(args) {
args.success = data => Ember.run(null, resolve, data);
args.error = xhr => Ember.run(null, reject, xhr);
args.url = getUrl(args.url);
Ember.$.ajax(args);
jQuery.ajax(args);
});
}

Some generated files are not rendered by default. Learn more.

0 comments on commit 9347108

Please sign in to comment.
You can’t perform that action at this time.