|
@@ -51,12 +51,10 @@ module.exports = class UppySocket {
|
|
}
|
|
}
|
|
|
|
|
|
on (action, handler) {
|
|
on (action, handler) {
|
|
- console.log(action)
|
|
|
|
this.emitter.on(action, handler)
|
|
this.emitter.on(action, handler)
|
|
}
|
|
}
|
|
|
|
|
|
emit (action, payload) {
|
|
emit (action, payload) {
|
|
- console.log(action)
|
|
|
|
this.emitter.emit(action, payload)
|
|
this.emitter.emit(action, payload)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -67,7 +65,6 @@ module.exports = class UppySocket {
|
|
_handleMessage (e) {
|
|
_handleMessage (e) {
|
|
try {
|
|
try {
|
|
const message = JSON.parse(e.data)
|
|
const message = JSON.parse(e.data)
|
|
- console.log(message)
|
|
|
|
this.emit(message.action, message.payload)
|
|
this.emit(message.action, message.payload)
|
|
} catch (err) {
|
|
} catch (err) {
|
|
console.log(err)
|
|
console.log(err)
|