-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
branch: react-router-v4-fix
Issue.
It throws error :
uncaught: { ReplyError: ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context
Code :
shareDbServer(
{
getHead: getHead,
appRoutes: {
main: getMainRoutes()
},
beforeStart: beforeStart
},
(ee, options) => {
ee.on('backend', async (backend) => {
let model = backend.createModel()
let $files = model.query('files', {})
console.log(model.subscribeAsync)
await model.subscribeAsync($files)
model.destroy()
})
}
)
It throws an error in line await model.subscribeAsync($files)
Quick Fix:
put the code in setTimeout.
Metadata
Metadata
Assignees
Labels
No labels