mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-16 03:44:26 +01:00
refactor: put conditional into just one line
This commit is contained in:
@@ -77,9 +77,7 @@ function connectStream(socket: WebSocket) {
|
||||
send(['EVENT', subId, event]);
|
||||
}
|
||||
} catch (e) {
|
||||
if (
|
||||
e instanceof RelayError
|
||||
) {
|
||||
if (e instanceof RelayError) {
|
||||
send(['CLOSED', subId, e.message]);
|
||||
} else {
|
||||
send(['CLOSED', subId, 'error: something went wrong']);
|
||||
|
||||
Reference in New Issue
Block a user