mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 19:37:34 -07:00
refactor: use ===
This commit is contained in:
parent
62ab5b4015
commit
74d968585a
1 changed files with 2 additions and 2 deletions
|
@ -100,9 +100,9 @@ export function connectStream(user: any, channel: string, listener: (message: Re
|
||||||
ws.on('open', () => {
|
ws.on('open', () => {
|
||||||
ws.on('message', data => {
|
ws.on('message', data => {
|
||||||
const msg = JSON.parse(data.toString());
|
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);
|
listener(msg.body);
|
||||||
} else if (msg.type == 'connected' && msg.body.id == 'a') {
|
} else if (msg.type === 'connected' && msg.body.id === 'a') {
|
||||||
res(ws);
|
res(ws);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue