DEV: Why use a whole object when a functionw will do?
This commit is contained in:
parent
94cb5ab172
commit
e5cd331fb3
|
@ -5,7 +5,7 @@ import { setDefaultHomepage } from "discourse/lib/utilities";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { listThemes, setLocalTheme } from "discourse/lib/theme-selector";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import pageReloader from "discourse/helpers/page-reloader";
|
||||
import { reload } from "discourse/helpers/page-reloader";
|
||||
import {
|
||||
safariHacksDisabled,
|
||||
isiPad,
|
||||
|
@ -193,7 +193,7 @@ export default Controller.extend({
|
|||
}
|
||||
|
||||
if (this.themeId !== this.currentThemeId) {
|
||||
pageReloader.reload();
|
||||
reload();
|
||||
}
|
||||
})
|
||||
.catch(popupAjaxError);
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import Ember from "ember";
|
||||
|
||||
export default EmberObject.create({
|
||||
reload: function() {
|
||||
if (!Ember.testing) {
|
||||
location.reload();
|
||||
}
|
||||
export function reload() {
|
||||
if (!Ember.testing) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue