Defining constants earlier

parent 50fc9a06
......@@ -42753,14 +42753,15 @@ _vue2.default.component('SingleMedia', __webpack_require__(184));
_vue2.default.component('MediaManager', __webpack_require__(43));
var currentLocale = window.AsgardCMS.currentLocale;
var adminPrefix = window.AsgardCMS.adminPrefix;
var router = new _vueRouter2.default({
mode: 'history',
base: makeBaseUrl(),
routes: [].concat(_toConsumableArray(_PageRoutes2.default), _toConsumableArray(_MediaRoutes2.default))
});
var currentLocale = window.AsgardCMS.currentLocale;
var adminPrefix = window.AsgardCMS.adminPrefix;
function makeBaseUrl() {
if (window.AsgardCMS.hideDefaultLocaleInURL == 1) {
return adminPrefix;
......@@ -27,6 +27,10 @@ Vue.component('MediaManager', require('../../../Modules/Media/Assets/js/componen
import PageRoutes from '../../../Modules/Page/Assets/js/PageRoutes';
import MediaRoutes from '../../../Modules/Media/Assets/js/MediaRoutes';
const currentLocale = window.AsgardCMS.currentLocale;
const adminPrefix = window.AsgardCMS.adminPrefix;
const router = new VueRouter({
mode: 'history',
base: makeBaseUrl(),
......@@ -36,8 +40,6 @@ const router = new VueRouter({
],
});
const currentLocale = window.AsgardCMS.currentLocale;
const adminPrefix = window.AsgardCMS.adminPrefix;
function makeBaseUrl() {
if (window.AsgardCMS.hideDefaultLocaleInURL == 1) {
return adminPrefix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment