Skip to content
Snippets Groups Projects
Commit 3c3140a1 authored by syuilo's avatar syuilo
Browse files

refactor: use ===

parent 8d5c9e96
No related branches found
No related tags found
No related merge requests found
......@@ -100,9 +100,9 @@ export function connectStream(user: any, channel: string, listener: (message: Re
ws.on('open', () => {
ws.on('message', data => {
const msg = JSON.parse(data.toString());
if (msg.type == 'channel' && msg.body.id == 'a') {
if (msg.type === 'channel' && msg.body.id === 'a') {
listener(msg.body);
} else if (msg.type == 'connected' && msg.body.id == 'a') {
} else if (msg.type === 'connected' && msg.body.id === 'a') {
res(ws);
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment