Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const socketHandler = socket => {
if (isOpenBrowser) {
socket.emit('event', JSON.stringify(actions.hotModuleReplacement()))
}
const emitter = event => socket.emit('event', JSON.stringify(event))
let unsubscribePromise = eventStore.subscribeOnBus(
{ types: [], ids: [] },
emitter
)
const unsubscribe = () => {
if (unsubscribePromise) {
unsubscribePromise.then(unsubscribeCallback => unsubscribeCallback())
unsubscribePromise = null
}
}
socket.on('setSubscription', eventsDescription => {