aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--desktop/sources/scripts/core/io/udp.js1
-rw-r--r--desktop/sources/scripts/cursor.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/desktop/sources/scripts/core/io/udp.js b/desktop/sources/scripts/core/io/udp.js
index e94ff64..615adf1 100644
--- a/desktop/sources/scripts/core/io/udp.js
+++ b/desktop/sources/scripts/core/io/udp.js
@@ -47,6 +47,7 @@ function Udp (client) {
}
this.play = function (data) {
+ if (!this.socket) { return }
this.socket.send(Buffer.from(`${data}`), this.port, client.io.ip, (err) => {
if (err) { console.warn(err) }
})
diff --git a/desktop/sources/scripts/cursor.js b/desktop/sources/scripts/cursor.js
index b03bfad..8b30f8f 100644
--- a/desktop/sources/scripts/cursor.js
+++ b/desktop/sources/scripts/cursor.js
@@ -107,9 +107,9 @@ function Cursor (client) {
this.inspect = () => {
if (this.w !== 0 || this.h !== 0) { return 'multi' }
- if (client.orca.lockAt(this.x, this.y)) { return 'locked' }
const port = client.portAt(this.x, this.y)
if (port) { return `${port[3]}` }
+ if (client.orca.lockAt(this.x, this.y)) { return 'locked' }
return 'empty'
}