We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd1a67c commit dcb224cCopy full SHA for dcb224c
packages/loro-websocket/src/client/index.ts
@@ -225,8 +225,12 @@ export class LoroWebsocketClient {
225
const maybeProcess = globalScope.process;
226
if (maybeProcess && typeof maybeProcess.on === "function") {
227
// Node environments may surface online/offline via the global process emitter.
228
- const online = () => this.handleOnline();
229
- const offline = () => this.handleOffline();
+ const online = () => {
+ this.handleOnline();
230
+ };
231
+ const offline = () => {
232
+ this.handleOffline();
233
234
maybeProcess.on("online", online);
235
maybeProcess.on("offline", offline);
236
this.removeNetworkListeners = () => {
0 commit comments