Transpiled ES5 code to ES6/ES7

This commit is contained in:
Liyas Thomas
2020-06-11 19:55:40 +05:30
parent 9bc0ae975a
commit 0644a8c9fb
16 changed files with 108 additions and 123 deletions

View File

@@ -136,9 +136,9 @@ export default {
icon: "sync_disabled",
})
}
this.socket.onmessage = (event) => {
this.socket.onmessage = ({ data }) => {
this.communication.log.push({
payload: event.data,
payload: data,
source: "server",
ts: new Date().toLocaleTimeString(),
})
@@ -181,7 +181,7 @@ export default {
this.communication.input = ""
},
walkHistory(direction) {
const clientMessages = this.communication.log.filter((msg) => msg.source === "client")
const clientMessages = this.communication.log.filter(({ source }) => source === "client")
const length = clientMessages.length
switch (direction) {
case "up":