Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Feb 14, 2021
1 parent 88cff97 commit 02f691d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/y-websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ const setupWS = provider => {
*/
const broadcastMessage = (provider, buf) => {
if (provider.wsconnected) {
// @ts-ignore We know that wsconnected = true
provider.ws.send(buf)
/** @type {WebSocket} */ (provider.ws).send(buf)
}
if (provider.bcconnected) {
provider.mux(() => {
Expand Down Expand Up @@ -258,7 +257,7 @@ export class WebsocketProvider extends Observable {
* @param {any} origin
*/
this._updateHandler = (update, origin) => {
if (origin !== this || origin === null) {
if (origin !== this) {
const encoder = encoding.createEncoder()
encoding.writeVarUint(encoder, messageSync)
syncProtocol.writeUpdate(encoder, update)
Expand Down

0 comments on commit 02f691d

Please sign in to comment.