mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-12 18:06:25 +00:00
logger-util: Avoid no-fallthrough warnings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -89,20 +89,21 @@ export default class Logger {
|
|||||||
nodeConsole, timestamp, level, logInDevMode
|
nodeConsole, timestamp, level, logInDevMode
|
||||||
} = this;
|
} = this;
|
||||||
|
|
||||||
/* eslint-disable no-fallthrough */
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case typeof timestamp === 'function':
|
case typeof timestamp === 'function':
|
||||||
args.unshift(timestamp() + ' |\t');
|
args.unshift(timestamp() + ' |\t');
|
||||||
|
// Fall through
|
||||||
|
|
||||||
case (level):
|
case (level):
|
||||||
args.unshift(type.toUpperCase() + ' |');
|
args.unshift(type.toUpperCase() + ' |');
|
||||||
|
// Fall through
|
||||||
|
|
||||||
case isDev || logInDevMode:
|
case isDev || logInDevMode:
|
||||||
nodeConsole[type](...args);
|
nodeConsole[type](...args);
|
||||||
|
break;
|
||||||
|
|
||||||
default: break;
|
default:
|
||||||
}
|
}
|
||||||
/* eslint-enable no-fallthrough */
|
|
||||||
|
|
||||||
console[type](...args);
|
console[type](...args);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user