Skip to content

Commit dca638a

Browse files
committed
fix: take settings from whoever is calling it
1 parent efb5c69 commit dca638a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/StacBrowser.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,22 @@ export default {
265265
},
266266
beforeCreate() {
267267
const cookies = cookie.parse(document.cookie);
268+
let MAIN_SETTING = 'SETTING_PLACEHOLDER'
269+
console.log(`MAIN_SETTING: ${JSON.stringify(MAIN_SETTING)}`)
270+
if (typeof MAIN_SETTING === 'object' && MAIN_SETTING.constructor === Object) {
271+
if (MAIN_SETTING['catalogUrl'] === undefined) {
272+
MAIN_SETTING['catalogUrl'] = null
273+
}
274+
} else {
275+
MAIN_SETTING = {
276+
'catalogUrl': null,
277+
}
278+
}
279+
console.log(`MAIN_SETTING: ${JSON.stringify(MAIN_SETTING)}`)
280+
this.$store.dispatch('setCatalogUrl', MAIN_SETTING['catalogUrl'])
268281
if (cookies['unity_token'] !== undefined) {
269282
this.$store.dispatch('setAuth', cookies['unity_token']);
270283
}
271-
this.$store.dispatch('setCatalogUrl', 'https://d3vc8w9zcq658.cloudfront.net/data/misc/catalog_list/')
272284
},
273285
created() {
274286
this.$router.onReady(() => {

0 commit comments

Comments
 (0)