Skip to content

Commit

Permalink
Update client.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLeiter committed Mar 16, 2023
1 parent 0c01e54 commit fb40069
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions server/client.ts
Expand Up @@ -476,10 +476,9 @@ class Client {
})
);
};

if (inputs.userInputs.has(cmd)) {
const plugin = inputs.userInputs.get(cmd)!; // this is only save because we just checked it


let plugin = inputs.userInputs.get(cmd);
if (plugin) {
if (!connected && !plugin.allowDisconnected) {
emitFailureDisconnected();
return;
Expand All @@ -489,9 +488,8 @@ class Client {
return;
}

if (inputs.pluginCommands.has(cmd)) {
const plugin = inputs.pluginCommands.get(cmd)!; // this is only save because we just checked it

plugin = inputs.pluginCommands.get(cmd);
if (plugin) {
if (!connected && !plugin.allowDisconnected) {
emitFailureDisconnected();
return;
Expand Down

0 comments on commit fb40069

Please sign in to comment.