Skip to content

Conversation

@aryzing
Copy link
Contributor

@aryzing aryzing commented Aug 11, 2022

Added a comment to clarify why reply messages are not sent when their length is 1. Alternatively we could also create a function with a descriptive name of the check being performed,

function hasMessage(encoder) {
    return encoding.length(encoder) > 1;
}

The if statement would then look something like,

if (hasMessage(encoder)) {
    send(...);
}

Thoughts?

Huly®: YJS-751

Added a comment to clarify why reply messages are not sent when their length is 1. Alternatively we could also create a function with a descriptive name of the check being performed,

```js
function hasMessage(encoder) {
    return encoding.length(encoder) > 1;
}
```

The `if` statement would then look something like,

```js
if (hasMessage(encoder)) {
    send(...);
}
```

Thoughts?
@dmonad
Copy link
Member

dmonad commented Aug 19, 2022

That works, thanks!

@dmonad dmonad merged commit 20c1ac2 into yjs:master Aug 19, 2022
@aryzing aryzing deleted the patch-1 branch August 22, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants