mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-11-27 09:23:55 +01:00
refactor: frontend de-spaghetti (dup declares, dead code, log gating)
- Remove the duplicate _gameMode declaration in the client SocketHandlers object literal — it was declared twice, so the later `null` silently shadowed the earlier `'free'`. Now declared once with the effective value. - Remove the dead SocketHandlers._appendMessage calls in smirkAuth.js; that method never existed, so the guard always fell through to the working .text() append. Keep the safe append. - Gate broadcastManager's high-volume per-event logs (user count, chat message incl. message/socketId PII, game update, game start) behind debug mode; previously they logged on every event regardless of NODE_ENV. Full suite: 21 suites / 155 tests.
This commit is contained in:
@@ -13,7 +13,8 @@ const SocketHandlers = {
|
||||
|
||||
_hasPayoutAddress: false,
|
||||
_creditsBalance: 0,
|
||||
_gameMode: 'free',
|
||||
_gameMode: null, // set from the server's game-modes event; was previously declared
|
||||
// twice in this object literal (the later `null` silently won)
|
||||
|
||||
_directPayoutsEnabled: false,
|
||||
_paymentsEnabled: false,
|
||||
@@ -1394,8 +1395,7 @@ const SocketHandlers = {
|
||||
// =====================
|
||||
// Early Entry Functions
|
||||
// =====================
|
||||
|
||||
_gameMode: null,
|
||||
|
||||
_earlyEntryConfig: { enabled: false },
|
||||
_isQueued: false,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user