Merge pull request #46 from eviltrout/get-url-deprecation
FIX: get-url deprecation
Dieser Commit ist enthalten in:
Commit
b41775efe1
2 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
|
@ -28,8 +28,6 @@ export default {
|
||||||
|
|
||||||
Discourse.Model = EmberObject.extend();
|
Discourse.Model = EmberObject.extend();
|
||||||
Discourse.__container__ = app.__container__;
|
Discourse.__container__ = app.__container__;
|
||||||
Discourse.getURLWithCDN = getUrl;
|
|
||||||
Discourse.getURL = getUrl;
|
|
||||||
|
|
||||||
registerRawHelpers(RawHandlebars, Handlebars);
|
registerRawHelpers(RawHandlebars, Handlebars);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import { ajax } from 'wizard/lib/ajax';
|
import { ajax } from 'wizard/lib/ajax';
|
||||||
|
import getURL from "discourse-common/lib/get-url";
|
||||||
|
|
||||||
const _loaded = {};
|
const _loaded = {};
|
||||||
const _loading = {};
|
const _loading = {};
|
||||||
|
|
||||||
|
@ -45,7 +47,7 @@ export default function loadScript(url, opts) {
|
||||||
|
|
||||||
|
|
||||||
return new Ember.RSVP.Promise(function(resolve) {
|
return new Ember.RSVP.Promise(function(resolve) {
|
||||||
url = Discourse.getURL(url);
|
url = getURL(url);
|
||||||
|
|
||||||
// If we already loaded this url
|
// If we already loaded this url
|
||||||
if (_loaded[url]) { return resolve(); }
|
if (_loaded[url]) { return resolve(); }
|
||||||
|
|
Laden …
In neuem Issue referenzieren