Skip to content

Commit 031271d

Browse files
committed
fix(app): Remove logging and don't finish is not bundle is given as first message
1 parent 80c96b2 commit 031271d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/app.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export default {
8484
let isFinished = true
8585
8686
this.bundles = data.states.map(state => state.name.toLowerCase())
87+
// Ignore if not bundle is given
88+
if (!this.bundles.length) {
89+
return
90+
}
8791
8892
for (const state of data.states) {
8993
const bundle = state.name.toLowerCase()

app/mixins/ws.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ export default {
99
},
1010

1111
wsConnect(path) {
12-
this.logWS('Connecting...')
13-
1412
this.wsURL = `ws://${location.hostname}:${location.port}${path}`
13+
this.logWS(`Connecting to ${this.wsURL}...`)
1514

1615
this.ws = new WebSocket(this.wsURL)
1716

@@ -65,7 +64,8 @@ export default {
6564

6665
onWSMessage(msg) {
6766
let data = msg.data
68-
this.logWS('Message: ', data)
67+
68+
// this.logWS('Message: ', data)
6969
try {
7070
if (data[0] === '{') {
7171
data = JSON.parse(data)

0 commit comments

Comments
 (0)