Skip to content

Commit

Permalink
fix(app): Remove logging and don't finish is not bundle is given as f…
Browse files Browse the repository at this point in the history
…irst message
  • Loading branch information
atinux committed Mar 20, 2019
1 parent 80c96b2 commit 031271d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export default {
let isFinished = true
this.bundles = data.states.map(state => state.name.toLowerCase())
// Ignore if not bundle is given
if (!this.bundles.length) {
return
}
for (const state of data.states) {
const bundle = state.name.toLowerCase()
Expand Down
6 changes: 3 additions & 3 deletions app/mixins/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export default {
},

wsConnect(path) {
this.logWS('Connecting...')

this.wsURL = `ws://${location.hostname}:${location.port}${path}`
this.logWS(`Connecting to ${this.wsURL}...`)

this.ws = new WebSocket(this.wsURL)

Expand Down Expand Up @@ -65,7 +64,8 @@ export default {

onWSMessage(msg) {
let data = msg.data
this.logWS('Message: ', data)

// this.logWS('Message: ', data)
try {
if (data[0] === '{') {
data = JSON.parse(data)
Expand Down

0 comments on commit 031271d

Please sign in to comment.