Open gr2m opened 7 years ago
Hi I went through the code as well as the APIs of this issue. As you mentioned above that the event is not called 'connect' but 'reconnect' and there are only 3 events declared in the hoodie-connection-status which are 'disconnect, reconnect and reset'. There is no event named 'connect'. So I guess if we just change 'connect' to 'reconnect', would it solve the issue ?
@Alice-anjali yes, I think so. It might break some tests so these will need to be fixed, too. And if the change does not break any tests, then we should probably add a test for it :) Do you want to give a try?
Yes I would definitely give it a try! ^_^
I changed 'connect' to 'reconnect' and checked it. There are no tests breaking. @sohini-roy is already writing related test cases in the coverage issue. So, can I make a PR for this?
can I make a PR for this?
Yes, please :) If you run into any blockers with the tests, let’s discuss there
I made a PR, please review it. :-)
The problem is in this line: https://github.com/hoodiehq/hoodie-client/blob/master/lib/init.js#L72
The event is not called
connect
butreconnect
, see https://github.com/hoodiehq/hoodie-connection-status#events