From 2f6372b0fded6183acb90dc092e48d6cd633c59f Mon Sep 17 00:00:00 2001 From: Arteom Balanuta Date: Sun, 11 Jul 2021 13:44:42 +0300 Subject: [PATCH] * console.error() added to a empty `catch` block. * typo fixes --- client/client.js | 4 ++-- documentation/templateCommand.js | 6 +++--- server/src/serverLib/MainServer.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/client.js b/client/client.js index 5b902bc..d333178 100644 --- a/client/client.js +++ b/client/client.js @@ -169,7 +169,7 @@ var notifySwitch = document.getElementById("notify-switch") var notifySetting = localStorageGet("notify-api") var notifyPermissionExplained = 0; // 1 = granted msg shown, -1 = denied message shown -// Inital request for notifications permission +// Initial request for notifications permission function RequestNotifyPermission() { try { var notifyPromise = Notification.requestPermission(); @@ -916,7 +916,7 @@ $('#highlight-selector').onchange = function (e) { setHighlight(e.target.value); } -// Load sidebar configaration values from local storage if available +// Load sidebar configuration values from local storage if available if (localStorageGet('scheme')) { setScheme(localStorageGet('scheme')); } diff --git a/documentation/templateCommand.js b/documentation/templateCommand.js index c9f3604..4971528 100644 --- a/documentation/templateCommand.js +++ b/documentation/templateCommand.js @@ -1,6 +1,6 @@ /* Description: This is a template module that should not be user in a production - enviroment + environment */ // you can require() modules here @@ -56,7 +56,7 @@ exports.initHooks = (server) => { `in`: a hook function registered as `in` will be called before the client request is passed to the module they are attempting to call. Note: socket in this context is the client that sent the data - `out`: a hook function registerd as `out` will be called before the data is + `out`: a hook function registered as `out` will be called before the data is sent to any clients. Note: `socket` in this context is the socket that will be sent the data. @@ -89,6 +89,6 @@ exports.requiredData = ['echo']; exports.info = { name: 'showcase', // actual command name aliases: ['templateModule'], // optional, an array of other names this module can be executed by - usage: 'showcase {echo}', // used for help output, can be ommited if no parameters are required + usage: 'showcase {echo}', // used for help output, can be omitted if no parameters are required description: 'Simple command module template & info' // used for help output }; diff --git a/server/src/serverLib/MainServer.js b/server/src/serverLib/MainServer.js index 41af7e5..745507d 100644 --- a/server/src/serverLib/MainServer.js +++ b/server/src/serverLib/MainServer.js @@ -289,7 +289,7 @@ class MainServer extends WsServer { if (socket.readyState === SocketReady) { socket.send(JSON.stringify(outgoingPayload)); } - } catch (e) { /* yolo */ } + } catch (e) { console.error(e); } } /**