mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Make getActiveClient throw an error if disconnected
This commit is contained in:
parent
a4294975a2
commit
9067b5a168
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ import { SERVER_BUFFER, BufferType } from "./state.js";
|
||||||
function getActiveClient(app) {
|
function getActiveClient(app) {
|
||||||
var buf = app.state.buffers.get(app.state.activeBuffer);
|
var buf = app.state.buffers.get(app.state.activeBuffer);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
return null;
|
throw new Error("Not connected to server");
|
||||||
}
|
}
|
||||||
return app.clients.get(buf.network);
|
return app.clients.get(buf.network);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue