Skip to content

Commit 888e6ae

Browse files
fix(test): console.log in prod isElectron
1 parent 15595ef commit 888e6ae

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

stores/infra.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export const use_infra_store = defineStore("infra", {
99
}),
1010
getters: {
1111
is_cloud() {
12+
console.log("is_cloud")
13+
console.log("TEST isElectron()", isElectron())
14+
console.log("TEST process.env.NODE_ENV", process.env.NODE_ENV)
1215
return !isElectron() && !process.env.NODE_ENV === "development"
1316
},
1417
domain_name() {

stores/viewer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ export const use_viewer_store = defineStore("viewer", {
2121
return "ws"
2222
}
2323
},
24-
port(state) {
24+
port() {
2525
if (use_infra_store().is_cloud) {
2626
return "443"
2727
} else {
28-
return state.default_local_port
28+
return this.default_local_port
2929
}
3030
},
31-
base_url(state) {
31+
base_url() {
3232
const infra_store = use_infra_store()
33-
let viewer_url = `${state.protocol}://${infra_store.domain_name}:${state.port}`
33+
let viewer_url = `${this.protocol}://${infra_store.domain_name}:${this.port}`
3434
if (infra_store.is_cloud) {
3535
if (infra_store.ID == "") {
3636
throw new Error("ID must not be empty in cloud mode")

0 commit comments

Comments
 (0)