fix very fatal issue

main v1.2.2
Ayush Mukherjee 4 years ago
parent de4ab6f395
commit eaea84fde0

@ -37,11 +37,13 @@ const recvUpdate = async (channel, data) => {
const sendInitial = async (id) => { const sendInitial = async (id) => {
const c = connections[id] const c = connections[id]
const stream = await crud['streams'].getById(c.streamid) if (c.streamid !== null) {
c.connection.send(JSON.stringify({ const stream = await crud['streams'].getById(c.streamid)
event: 'streams:read', c.connection.send(JSON.stringify({
data: stream, event: 'streams:read',
})) data: stream,
}))
}
} }
module.exports = { module.exports = {

Loading…
Cancel
Save